following Error occure in myscript.my system anaconda folder threading.py file exist but error line 810 does not exist.plz suggest proper solution
Exception in thread Thread-18:
Traceback (most recent call last):
File "C:\Anaconda\lib\threading.py", line 810, in __bootstrap_inner
self.run()
File "C:\Anaconda\lib\threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "C:\Anaconda\lib\site-packages\envoy\core.py", line 32, in target
File "C:\Anaconda\lib\subprocess.py", line 709, in __init__
errread, errwrite)
File "C:\Anaconda\lib\subprocess.py", line 957, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
followind code error occure
AttributeError Traceback (most recent call last)
in ()
8 F='resources/ch06-mailboxes/data/enron.mbox.json.bz2'
9 r = envoy.run("bunzip2 %s" % (F,)) --->this line error occured
10 print r.std_out
11 print r.std_err
C:\Anaconda\lib\site-packages\envoy\core.py in run(command, data, timeout)
166
167 cmd = Command(c)
168 out, err = cmd.run(data, timeout) --->this line error occured
169
170 r = Response(process=cmd)
C:\Anaconda\lib\site-packages\envoy\core.py in run(self, data, timeout)
51 self.process=process;
52 thread.join()
53 self.returncode = self.process.returncode ---->this line error occured
54 return self.out, self.err
55
AttributeError: 'NoneType' object has no attribute 'returncode'
The message as such is fairly self-explanatory: "The system cannot find the file specified". I would recommend you do verify you provided the correct directory route to the script.
It would be good also for you to provide more context on the error per se. Is error the thread longer?, can you show the original code creating the error?
Related
did anyone know why this error happen? other solver such as cbc works fine but when sent to NEOS, I got the following error in command line
Traceback (most recent call last):
File "C:\repos\work_packager\Test\Scratch\Networkx_Sample\testss.py", line 409, in
process_data(df, df)
File "C:\repos\work_packager\Test\Scratch\Networkx_Sample\testss.py", line 191, in process_data
pyomo_tool(df,road_year, pit_year, road_estimated_cost, pit_estimated_cost, road_tot_budget, pit_tot_budget,
File "C:\repos\work_packager\Test\Scratch\Networkx_Sample\testss.py", line 291, in pyomo_tool
solver.solve(model)
File "C:\Python31\lib\site-packages\pyomo\opt\results\container.py", line 284, in getattr
raise AttributeError("Unknown attribute "+str(name)+"' for object with type "+str(type(self))) AttributeError: Unknown attribute solve' for object with type <class 'pyomo.opt.results.results_.SolverResults'>
I installed an SSL certificate few months ago and now it's expired. When I am trying to update it using
certbot renew
it give me a following error.
Saving debug log to /var/log/letsencrypt/letsencrypt.log
Processing /etc/letsencrypt/renewal/www.bureaubureau.dk.conf
Cert is due for renewal, auto-renewing...
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/init.py", line 859, in emit
msg = self.format(record)
File "/usr/lib/python2.7/dist-packages/certbot/coloredlogging.py", line 41, i n format
else super(StreamHandler, self).format(record))
File "/usr/lib/python2.7/logging/init.py", line 732, in format
return fmt.format(record)
File "/usr/lib/python2.7/logging/init.py", line 471, in format
record.message = record.getMessage()
File "/usr/lib/python2.7/logging/init.py", line 335, in getMessage
msg = msg % self.args
TypeError: _str__ returned non-string (type Error)
Logged from file renewal.py, line 420
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/handlers.py", line 76, in emit
if self.shouldRollover(record):
File "/usr/lib/python2.7/logging/handlers.py", line 156, in shouldRollover
msg = "%s\n" % self.format(record)
File "/usr/lib/python2.7/logging/init.py", line 732, in format
return fmt.format(record)
File "/usr/lib/python2.7/logging/init.py", line 471, in format
record.message = record.getMessage()
File "/usr/lib/python2.7/logging/init.py", line 335, in getMessage
msg = msg % self.args
TypeError: str returned non-string (type Error)
Logged from file renewal.py, line 420
Processing /etc/letsencrypt/renewal/bureaubureau.dk.conf
Cert is due for renewal, auto-renewing...
Starting new HTTPS connection (1): acme-v01.api.letsencrypt.org
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/init.py", line 859, in emit
msg = self.format(record)
File "/usr/lib/python2.7/dist-packages/certbot/coloredlogging.py", line 41, i n format
else super(StreamHandler, self).format(record))
File "/usr/lib/python2.7/logging/init.py", line 732, in format
return fmt.format(record)
File "/usr/lib/python2.7/logging/init.py", line 471, in format
record.message = record.getMessage()
File "/usr/lib/python2.7/logging/init.py", line 335, in getMessage
msg = msg % self.args
TypeError: _str__ returned non-string (type Error)
Logged from file renewal.py, line 420
Traceback (most recent call last):
File "/usr/lib/python2.7/logging/handlers.py", line 76, in emit
if self.shouldRollover(record):
File "/usr/lib/python2.7/logging/handlers.py", line 156, in shouldRollover
msg = "%s\n" % self.format(record)
File "/usr/lib/python2.7/logging/init.py", line 732, in format
return fmt.format(record)
File "/usr/lib/python2.7/logging/init.py", line 471, in format
record.message = record.getMessage()
File "/usr/lib/python2.7/logging/init.py", line 335, in getMessage
msg = msg % self.args
TypeError: str returned non-string (type Error)
Logged from file renewal.py, line 420
All renewal attempts failed. The following certs could not be renewed:
/etc/letsencrypt/live/www.bureaubureau.dk/fullchain.pem (failure)
/etc/letsencrypt/live/bureaubureau.dk/fullchain.pem (failure)
2 renew failure(s), 0 parse failure(s)
I have gone through similar questions but nothing helped.
I also used
sudo -H pip install -U requests
I get the same response
Cleaning up...
Exception:
Traceback (most recent call last):
File "/usr/lib/python2.7/dist-packages/pip/basecommand.py", line 122, in main
status = self.run(options, args)
File "/usr/lib/python2.7/dist-packages/pip/commands/install.py", line 290, in run
requirementset.preparefiles(finder, forcerootegginfo=self.bundle, bundle=self.bundle)
File "/usr/lib/python2.7/dist-packages/pip/req.py", line 1097, in preparefiles
reqtoinstall, self.upgrade)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 194, in findrequirement
page = self.getpage(mainindexurl, req)
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 568, in _getpage
session=self.session,
File "/usr/lib/python2.7/dist-packages/pip/index.py", line 694, in getpage
req, link, "connection error: %s" % exc, url,
TypeError: _str__ returned non-string (type Error)
Storing debug log for failure in /root/.pip/pip.log
I finally solved it myself. The Debian 8 is deprecated and was not supported any more, so I upgraded my droplet to Debian 9 and upgraded all packages and certbot-auto and it fixed my problem.
i am new to EMR. i have tried to parse a 500 gb file in spark .
i setup a spark cluster in EMR with 32 nodes with spark and hadoop and zeppelin installed. the file is in the s3. when i tried with smaller file it works well (same code and same s3 location) but with the 500 gb file i have got the following error. can someone help me?
Traceback (most recent call last):
File "/tmp/zeppelin_pyspark-4268307265600611017.py", line 367, in <module>
raise Exception(traceback.format_exc())
Exception: Traceback (most recent call last):
File "/tmp/zeppelin_pyspark-4268307265600611017.py", line 360, in <module>
exec(code, _zcUserQueryNameSpace)
File "<stdin>", line 3, in <module>
File "/usr/lib/spark/python/pyspark/rdd.py", line 1073, in count
return self.mapPartitions(lambda i: [sum(1 for _ in i)]).sum()
File "/usr/lib/spark/python/pyspark/rdd.py", line 1064, in sum
return self.mapPartitions(lambda x: [sum(x)]).fold(0, operator.add)
File "/usr/lib/spark/python/pyspark/rdd.py", line 935, in fold
vals = self.mapPartitions(func).collect()
File "/usr/lib/spark/python/pyspark/rdd.py", line 834, in collect
sock_info = self.ctx._jvm.PythonRDD.collectAndServe(self._jrdd.rdd())
File "/usr/lib/spark/python/lib/py4j-0.10.7-src.zip/py4j/java_gateway.py",
line 1257, in __call__
answer, self.gateway_client, self.target_id, self.name)
File "/usr/lib/spark/python/pyspark/sql/utils.py", line 63, in deco
return f(*a, **kw)
File "/usr/lib/spark/python/lib/py4j-0.10.7-src.zip/py4j/protocol.py", line
328, in get_return_value
format(target_id, ".", name), value)
Py4JJavaError: An error occurred while calling
z:org.apache.spark.api.python.PythonRDD.collectAndServe.
: org.apache.spark.SparkException: Job aborted due to stage failure: Task 0
in stage 0.0 failed 4 times, most recent failure: Lost task 0.3 in stage 0.0
(TID 3, ip-10-0-12-220.ec2.internal, executor 19):
java.lang.RuntimeException: java.io.FileNotFoundException:
/mnt1/yarn/usercache/zeppelin/filecache/13/
__spark_libs__8980026775986932451.zip
/hadoop-common-2.8.4-amzn-1.jar (No such file or directory)
at
org.apache.hadoop.conf.Configuration.loadResource(Configuration.java:2854)
at
org.apache.hadoop.conf.Configuration.loadResources(Configuration.java:2696)
at org.apache.hadoop.conf.Configuration.getProps(Configuration.java:2579)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1257)
at org.apache.hadoop.conf.Configuration.set(Configuration.java:1229)
... 30 more
ERROR
Took 1 min 28 sec. Last updated by anonymous at October 23 2018, 6:00:06 PM.
I have installed package envoy. I ran the script but a windows error occured .I commented envoy.run then the full script runs but when I remove the comment, error occurs.
import envoy
# This data is checked-in to the repository and is a compressed
# version of the output from Example 3
F = 'resources/ch06-mailboxes/data/enron.mbox.json.bz2'
r = envoy.run("bunzip2 %s" % (F,))
print r.std_out
print r.std_err
traceback of script:
Exception in thread Thread-9:
Traceback (most recent call last):
File "C:\Users\sachin\Anaconda\lib\threading.py", line 810, in __bootstrap_inner
self.run()
File "C:\Users\sachin\Anaconda\lib\threading.py", line 763, in run
self.__target(*self.__args, **self.__kwargs)
File "C:\Users\sachin\Anaconda\lib\site-packages\envoy\core.py", line 40, in target
bufsize=0,
File "C:\Users\sachin\Anaconda\lib\subprocess.py", line 709, in __init__
errread, errwrite)
File "C:\Users\sachin\Anaconda\lib\subprocess.py", line 957, in _execute_child
startupinfo)
WindowsError: [Error 2] The system cannot find the file specified
Please try this:
F = os.path.join(os.getcwd(), 'resources/ch06-mailboxes/data/enron.mbox.json.bz2')
Environment:
Scrapy 0.16.2
Twisted-12.2.0
python 2.7
macosx-10.6
Okey here is my problem:
I try to run
scrapy shell http://aaa.17domn.com/bt9/file.php/MERH77V.html
Error:
[ScrapyHTTPPageGetter,client] Unhandled Error
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-macosx-10.6-intel.egg/twisted/internet/selectreactor.py", line 150, in _doReadOrWrite
why = getattr(selectable, method)()
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-macosx-10.6-intel.egg/twisted/internet/tcp.py", line 202, in doRead
return self._dataReceived(data)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-macosx-10.6-intel.egg/twisted/internet/tcp.py", line 208, in _dataReceived
rval = self.protocol.dataReceived(data)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-macosx-10.6-intel.egg/twisted/protocols/basic.py", line 564, in dataReceived
why = self.lineReceived(line)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Scrapy-0.16.2-py2.7.egg/scrapy/core/downloader/webclient.py", line 50, in lineReceived
return HTTPClient.lineReceived(self, line.rstrip())
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-macosx-10.6-intel.egg/twisted/web/http.py", line 450, in lineReceived
self.extractHeader(self._header)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-macosx-10.6-intel.egg/twisted/web/http.py", line 406, in extractHeader
key, val = header.split(':',1)
exceptions.ValueError: need more than 1 value to unpack
I found the solution from https://groups.google.com/forum/#!msg/scrapy-users/xFKo8ggzPxs/VXDl3CZ4V4cJ
They describe this is caused by twisted. Then I patched function extractHeader in /twisted/web/http.py from http://twistedmatrix.com/trac/ticket/2842. Its WORKS
BUT BUT, Hold on NOt yet!!!
I run another web
scrapy shell http://www1.wkdown.info/fs3/file.php/M994ATR.html
Error:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Twisted-12.2.0-py2.7-macosx-10.6-intel.egg/twisted/internet/defer.py", line 551, in _runCallbacks
current.result = callback(current.result, *args, **kw)
File "/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/site-packages/Scrapy-0.16.2-py2.7.egg/scrapy/core/downloader/webclient.py", line 122, in _build_response
status = int(self.status)
ValueError: invalid literal for int() with base 10: 'html'
I think something happen on response headers. Scrapy cannot handle it well.
Any idea?
Thank you!