I am new to python. And I need to run getmail. After lots of error msgs I reduced my claim to run the tests under lib/test first:
python .\test\regrtest.py -v -M 2.0Gb -uall,-bsddb,-largefile
I am getting failure msgs from some of them but at:
test test_re failed -- Traceback (most recent call last):
File "F:\python27_64\lib\test\test_support.py", line 1287, in wrapper
return f(self, maxsize)
File "F:\python27_64\lib\test\test_re.py", line 973, in test_large_search
s = 'a' * size
OverflowError: cannot fit 'long' into an index-sized integer
Warning -- files was modified by test_sax
test test_shutil failed -- Traceback (most recent call last):
File "F:\python27_64\lib\test\test_shutil.py", line 138, in test_rmtree_dont_delete_file
handle, path = tempfile.mkstemp()
File "F:\python27_64\lib\tempfile.py", line 314, in mkstemp
return _mkstemp_inner(dir, prefix, suffix, flags)
File "F:\python27_64\lib\tempfile.py", line 245, in _mkstemp_inner
_set_cloexec(fd)
File "F:\python27_64\lib\tempfile.py", line 50, in _set_cloexec
flags = _fcntl.fcntl(fd, _fcntl.F_GETFD, 0)
AttributeError: 'module' object has no attribute 'F_GETFD'
python is hangup :-(
ALL ideas are welcome
Related
23 aditi#DESKTOP-9EEMTR0 ~/ardupilot/ArduCopter
$ ../Tools/autotest/sim_vehicle.py --map --console
SIM_VEHICLE: Start
SIM_VEHICLE: Killing tasks
SIM_VEHICLE: kill_tasks failed: a bytes-like object is required, not 'str'
SIM_VEHICLE: Starting up at -35.363261,149.165230,584,353 (CMAC)
SIM_VEHICLE: WAF build
SIM_VEHICLE: Configure waf
SIM_VEHICLE: "/home/aditi/ardupilot/modules/waf/waf-light" "configure" "--board" "sitl"
Traceback (most recent call last):
File "/home/aditi/ardupilot/modules/waf/waflib/Node.py", line 579, in ant_iter
raise StopIteration
StopIteration
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "/home/aditi/ardupilot/modules/waf/waflib/Scripting.py", line 165, in waf_entry_point
run_commands()
File "/home/aditi/ardupilot/modules/waf/waflib/Scripting.py", line 262, in run_commands
parse_options()
File "/home/aditi/ardupilot/modules/waf/waflib/Scripting.py", line 214, in parse_options
Context.create_context('options').execute()
File "/home/aditi/ardupilot/modules/waf/waflib/Options.py", line 271, in execute
super(OptionsContext, self).execute()
File "/home/aditi/ardupilot/modules/waf/waflib/Context.py", line 205, in execute
self.recurse([os.path.dirname(g_module.root_path)])
File "/home/aditi/ardupilot/modules/waf/waflib/Context.py", line 287, in recurse
user_function(self)
File "/home/aditi/ardupilot/wscript", line 49, in options
opt.load('compiler_cxx compiler_c waf_unit_test python')
File "/home/aditi/ardupilot/modules/waf/waflib/Context.py", line 197, in load
fun(self)
File "/home/aditi/ardupilot/modules/waf/waflib/Tools/compiler_cxx.py", line 103, in options
opt.load_special_tools('cxx_*.py')
File "/home/aditi/ardupilot/modules/waf/waflib/Context.py", line 609, in load_special_tools
lst = self.root.find_node(waf_dir).find_node('waflib/extras').ant_glob(var)
File "/home/aditi/ardupilot/modules/waf/waflib/Node.py", line 672, in ant_glob
ret = [x for x in self.ant_iter(accept=accept, pats=[to_pat(incl), to_pat(excl)], maxdepth=kw.get('maxdepth', 25), dir=dir, src=src, remove=kw.get('remove', True))]
File "/home/aditi/ardupilot/modules/waf/waflib/Node.py", line 672, in <listcomp>
ret = [x for x in self.ant_iter(accept=accept, pats=[to_pat(incl), to_pat(excl)], maxdepth=kw.get('maxdepth', 25), dir=dir, src=src, remove=kw.get('remove', True))]
RuntimeError: generator raised StopIteration
SIM_VEHICLE: (Configure waf) exited with code 512
SIM_VEHICLE: Killing tasks
SIM_VEHICLE: kill_tasks failed: a bytes-like object is required, not 'str'
It's not clear what exactly it is, but you may have just made a mistake somewhere in your Python file based on << a bytes-like object is required, not 'str' >> meaning somewhere you should not enter a string, But you entered a string and you should not do this
Maybe in file sim_vehicle.py
I'm running a pyspark job submit on a university server:
My configuration is :
--master yarn --deploy-mode cluster --num-executors 150 --executor-cores 4 --executor-memory 28g --driver-memory 28g
My first few steps runs correctly :
df = spark.read.format('csv') \
.option('header',True) \
.option('multiLine', True) \
.load(data_file)
df.show()
udf_function = udf(stamp, StringType())
new_df = df.withColumn("column_a", udf_function(struct([df[x] for x in df.columns])))
new_df.show()
When I try to run the following commands separately, I get two very similar errors:
Command 1:
new_df.select("column_a").distinct().show(100)
Error:
ERROR:root:Exception while sending command.
Traceback (most recent call last):
File "/hadoop4/yarn/nm/usercache/apps/appcache/application_1593105789029_2249545/container_e01_1593105789029_2249545_02_000002/py4j-0.10.7-src.zip/py4j/java_gateway.py", line 1159, in send_command
raise Py4JNetworkError("Answer from Java side is empty")
py4j.protocol.Py4JNetworkError: Answer from Java side is empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/hadoop4/yarn/nm/usercache/apps/appcache/application_1593105789029_2249545/container_e01_1593105789029_2249545_02_000002/py4j-0.10.7-src.zip/py4j/java_gateway.py", line 985, in send_command
response = connection.send_command(command)
File "/hadoop4/yarn/nm/usercache/apps/appcache/application_1593105789029_2249545/container_e01_1593105789029_2249545_02_000002/py4j-0.10.7-src.zip/py4j/java_gateway.py", line 1164, in send_command
"Error while receiving", e, proto.ERROR_ON_RECEIVE)
py4j.protocol.Py4JNetworkError: Error while receiving
Traceback (most recent call last):
File "python_stamp.py", line 93, in <module>
main()
File "python_stamp.py", line 82, in main
new_df.select("planning_cluster_id").distinct().show(100)
File "/hadoop4/yarn/nm/usercache/apps/appcache/application_1593105789029_2249545/container_e01_1593105789029_2249545_02_000002/pyspark.zip/pyspark/sql/dataframe.py", line 380, in show
Command 2:
new_df.write.mode("overwrite").format("csv").option("delimiter", ",").option("header", "true").save(save_path)
Error:
ERROR:root:Exception while sending command.
Traceback (most recent call last):
File "/hadoop1/yarn/nm/usercache/apps/appcache/application_1593105789029_2249417/container_e01_1593105789029_2249417_02_000002/py4j-0.10.7-src.zip/py4j/java_gateway.py", line 1159, in send_command
raise Py4JNetworkError("Answer from Java side is empty")
py4j.protocol.Py4JNetworkError: Answer from Java side is empty
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/hadoop1/yarn/nm/usercache/apps/appcache/application_1593105789029_2249417/container_e01_1593105789029_2249417_02_000002/py4j-0.10.7-src.zip/py4j/java_gateway.py", line 985, in send_command
response = connection.send_command(command)
File "/hadoop1/yarn/nm/usercache/apps/appcache/application_1593105789029_2249417/container_e01_1593105789029_2249417_02_000002/py4j-0.10.7-src.zip/py4j/java_gateway.py", line 1164, in send_command
"Error while receiving", e, proto.ERROR_ON_RECEIVE)
py4j.protocol.Py4JNetworkError: Error while receiving
Traceback (most recent call last):
File "python_stamp.py", line 91, in <module>
main()
File "python_stamp.py", line 83, in main
new_df.write.mode("overwrite").format("csv").option("delimiter", ",").option("header", "true").save(save_path)
File "/hadoop1/yarn/nm/usercache/apps/appcache/application_1593105789029_2249417/container_e01_1593105789029_2249417_02_000002/pyspark.zip/pyspark/sql/readwriter.py", line 738, in save
File "/hadoop1/yarn/nm/usercache/apps/appcache/application_1593105789029_2249417/container_e01_1593105789029_2249417_02_000002/py4j-0.10.7-src.zip/py4j/java_gateway.py", line 1257, in __call__
File "/hadoop1/yarn/nm/usercache/apps/appcache/application_1593105789029_2249417/container_e01_1593105789029_2249417_02_000002/pyspark.zip/pyspark/sql/utils.py", line 63, in deco
File "/hadoop1/yarn/nm/usercache/apps/appcache/application_1593105789029_2249417/container_e01_1593105789029_2249417_02_000002/py4j-0.10.7-src.zip/py4j/protocol.py", line 336, in get_return_value
py4j.protocol.Py4JError: An error occurred while calling o112.save
Does anyone know the reason behind it? I'm pretty confident that it's not because of any memory error, as the previous steps which show the table, load the table all are running correctly.
Additional information: When I run all of these commands on pyspark shell, they run perfectly well.
I have the virtualbox 5.0.10 Python sdk in my source root, but when I run my code the program will fail:
Traceback (most recent call last):
File "C:/Users/xiao/.PyCharm50/config/scratches/scratch", line 2, in <module>
mgr=vboxapi.VirtualBoxManager()
File "C:\Users\xiao\Desktop\test\vboxapi\__init__.py", line 1018, in __init__
self.platform = PlatformMSCOM(dPlatformParams)
File "C:\Users\xiao\Desktop\test\vboxapi\__init__.py", line 513, in __init__
win32com.client.gencache.EnsureDispatch('VirtualBox.Session')
File "C:\Python27\lib\site-packages\win32com\client\gencache.py", line 540, in EnsureDispatch
disp_class = CLSIDToClass.GetClass(str(disp_clsid))
File "C:\Python27\lib\site-packages\win32com\client\CLSIDToClass.py", line 46, in GetClass
return mapCLSIDToClass[clsid]
KeyError: '{7844AA05-B02E-4CDD-A04F-ADE4A762E6B7}'
Here is my code: (really simple, right?)
import vboxapi
mgr=vboxapi.VirtualBoxManager()
This program is buggy under Python 2.7.6, but runabble under Python 3.4.0.
Why? How can I fix that?
I am using Rpy2 and running the tests using $python -m "rpy2.tests". I got the following errors. I am using ubuntu 14.03, python 2.7 and trying to calling R in python using this package.
rpy2 version: 2.6.0
- built against R version: 3-2.1--68531
- running linked to R version: R version 3.2.1 (2015-06-18)
....../tmp/tmpRWL4lU.py:17: UserWarning:
ri.baseenv['eval'](ri.parse(rcode))
..................................................................................................................................................................................x.........................................................................................................E
Stderr:
/usr/local/lib/python2.7/dist-packages/rpy2-2.6.0-py2.7-linux-x86_64.egg/rpy2/robjects/methods.py:80: UserWarning: Error in as.environment(where) : no item called "None" on the search list
StrSexpVector((cls_packagename, )))
E...................................sssssssss................................E.s...s..s.....
======================================================================
ERROR: testRS4Auto_Type (robjects.tests.testMethods.MethodsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/rpy2-2.6.0-py2.7-linux-x86_64.egg/rpy2/robjects/tests/testMethods.py", line 115, in testRS4Auto_Type
robjects.methods.RS4)):
File "/usr/lib/python2.7/dist-packages/six.py", line 617, in with_metaclass
return meta("NewBase", bases, {})
File "/usr/local/lib/python2.7/dist-packages/rpy2-2.6.0-py2.7-linux-x86_64.egg/rpy2/robjects/methods.py", line 154, in __new__
cls_def = getclassdef(cls_rname, cls_rpackagename)
File "/usr/local/lib/python2.7/dist-packages/rpy2-2.6.0-py2.7-linux-x86_64.egg/rpy2/robjects/methods.py", line 80, in getclassdef
StrSexpVector((cls_packagename, )))
RRuntimeError: Error in as.environment(where) : no item called "None" on the search list
Stderr:
/usr/local/lib/python2.7/dist-packages/rpy2-2.6.0-py2.7-linux-x86_64.egg/rpy2/robjects/methods.py:80: UserWarning: Error in as.environment(where) : no item called "None" on the search list
StrSexpVector((cls_packagename, )))
======================================================================
ERROR: testRS4Auto_Type_nopackname (robjects.tests.testMethods.MethodsTestCase)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/rpy2-2.6.0-py2.7-linux-x86_64.egg/rpy2/robjects/tests/testMethods.py", line 122, in testRS4Auto_Type_nopackname
robjects.methods.RS4)):
File "/usr/lib/python2.7/dist-packages/six.py", line 617, in with_metaclass
return meta("NewBase", bases, {})
File "/usr/local/lib/python2.7/dist-packages/rpy2-2.6.0-py2.7-linux-x86_64.egg/rpy2/robjects/methods.py", line 154, in __new__
cls_def = getclassdef(cls_rname, cls_rpackagename)
File "/usr/local/lib/python2.7/dist-packages/rpy2-2.6.0-py2.7-linux-x86_64.egg/rpy2/robjects/methods.py", line 80, in getclassdef
StrSexpVector((cls_packagename, )))
RRuntimeError: Error in as.environment(where) : no item called "None" on the search list
======================================================================
ERROR: test_Rconverter (ipython.tests.test_rmagic.TestRmagic)
----------------------------------------------------------------------
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/rpy2-2.6.0-py2.7-linux-x86_64.egg/rpy2/ipython/tests/test_rmagic.py", line 127, in test_Rconverter
tuple(fromr_dataf_np.ix[col_i].values))
File "/usr/lib/python2.7/dist-packages/numpy/core/records.py", line 418, in __getattribute__
raise AttributeError("record array has no attribute %s" % attr)
AttributeError: record array has no attribute ix
----------------------------------------------------------------------
Ran 383 tests in 3.719s
FAILED (errors=3, skipped=12, expected failures=1)
Any ideas to fix these three errors?
Thanks,
I am following this link to compile Chromium Browser and I successfully walked through each step but I get the following error at the 17th step: gclient sync:
mrgrj#mrgrj:~/chromium/buildhost/src$ gclient sync
Syncing projects: 4% ( 3/72) src/chrome/tools/test/reference_build/chrome_linSyncing projects: 5% ( 4/72) src/sdch/open-vcdiff Syncing projects: 100% (75/75), done.
________ running '/usr/bin/python src/build/landmines.py' in '/home/mrgrj/chromium/buildhost'
________ running '/usr/bin/python src/build/download_nacl_toolchains.py --mode nacl_core_sdk sync --extract' in '/home/mrgrj/chromium/buildhost'
Traceback (most recent call last):
File "src/build/download_nacl_toolchains.py", line 59, in <module>
sys.exit(Main(sys.argv[1:]))
File "src/build/download_nacl_toolchains.py", line 29, in Main
import package_version
File "/home/mrgrj/chromium/buildhost/src/native_client/build/package_version/package_version.py", line 40, in <module>
import argparse
ImportError: No module named argparse
Traceback (most recent call last):
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 2313, in <module>
sys.exit(main(sys.argv[1:]))
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 2299, in main
return dispatcher.execute(OptionParser(), argv)
File "/home/mrgrj/chromium/depot_tools/subcommand.py", line 252, in execute
return command(parser, args[1:])
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 2056, in CMDsync
ret = client.RunOnDeps('update', args)
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 1528, in RunOnDeps
self.RunHooksRecursively(self._options)
File "/home/mrgrj/chromium/depot_tools/gclient.py", line 983, in RunHooksRecursively
hook, cwd=self.root.root_dir, always=True)
File "/home/mrgrj/chromium/depot_tools/gclient_utils.py", line 293, in CheckCallAndFilterAndHeader
return CheckCallAndFilter(args, **kwargs)
File "/home/mrgrj/chromium/depot_tools/gclient_utils.py", line 538, in CheckCallAndFilter
rv, args, kwargs.get('cwd', None), None, None)
File "/home/mrgrj/chromium/depot_tools/subprocess2.py", line 37, in __init__
super(CalledProcessError, self).__init__(returncode, cmd, output=stdout)
TypeError: __init__() got an unexpected keyword argument 'output'
Any hints on how can I get rid of it ? I will update this post with any necesarry information that you'll need.
Update the python version to 2.7 or greater. One of the problems is that you don't have argparse which is on the newest version of python.