scipy.test() results in errors - python-2.7

Having some problems with scipy. Installed latest version using pip (0.17.0). Run scipy.test() and I'm getting the following errors. Are they okay to ignore? I'm using python 2.7.6.
Thanks for your help.
======================================================================
ERROR: test_add_function_ordered (test_catalog.TestCatalog)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/tests/test_catalog.py", line 477, in test_add_function_ordered
q.add_function('f',string.upper)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 833, in add_function
self.add_function_persistent(code,function)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 849, in add_function_persistent
cat = get_catalog(cat_dir,mode)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 486, in get_catalog
sh = shelve.open(catalog_file,mode)
File "/usr/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.7/shelve.py", line 222, in init
import anydbm
File "/usr/lib/python2.7/anydbm.py", line 50, in
_errors.append(_mod.error)
AttributeError: 'module' object has no attribute 'error'
======================================================================
ERROR: test_add_function_persistent1 (test_catalog.TestCatalog)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/tests/test_catalog.py", line 466, in test_add_function_persistent1
q.add_function_persistent('code',i)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 849, in add_function_persistent
cat = get_catalog(cat_dir,mode)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 486, in get_catalog
sh = shelve.open(catalog_file,mode)
File "/usr/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.7/shelve.py", line 222, in init
import anydbm
File "/usr/lib/python2.7/anydbm.py", line 50, in
_errors.append(_mod.error)
AttributeError: 'module' object has no attribute 'error'
======================================================================
ERROR: test_get_existing_files2 (test_catalog.TestCatalog)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/tests/test_catalog.py", line 394, in test_get_existing_files2
q.add_function('code', os.getpid)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 833, in add_function
self.add_function_persistent(code,function)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 849, in add_function_persistent
cat = get_catalog(cat_dir,mode)
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 486, in get_catalog
sh = shelve.open(catalog_file,mode)
File "/usr/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.7/shelve.py", line 222, in init
import anydbm
File "/usr/lib/python2.7/anydbm.py", line 50, in
_errors.append(_mod.error)
AttributeError: 'module' object has no attribute 'error'
======================================================================
ERROR: test_create_catalog (test_catalog.TestGetCatalog)
Traceback (most recent call last):
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/tests/test_catalog.py", line 286, in test_create_catalog
cat = catalog.get_catalog(pardir,'c')
File "/usr/local/lib/python2.7/dist-packages/scipy/weave/catalog.py", line 486, in get_catalog
sh = shelve.open(catalog_file,mode)
File "/usr/lib/python2.7/shelve.py", line 239, in open
return DbfilenameShelf(filename, flag, protocol, writeback)
File "/usr/lib/python2.7/shelve.py", line 222, in init
import anydbm
File "/usr/lib/python2.7/anydbm.py", line 50, in
_errors.append(_mod.error)
AttributeError: 'module' object has no attribute 'error'
Ran 20343 tests in 138.416s
FAILED (KNOWNFAIL=98, SKIP=1679, errors=4)

All these are in weave, which is not used anywhere else in scipy itself. So unless you're using weave directly, you're likely OK. And there is likely no reason to use weave in new code anyway.

Related

using pipreqs getting unknown error while to create requirements.txt

pipreqs .\
the following error is comming. i searched on the google i didn't find any solution.
ERROR: Failed on file: .\static\bower_components\jvectormap\converter\converter.py
Traceback (most recent call last):
File "C:\Users\bsant\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 196, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\bsant\AppData\Local\Programs\Python\Python310\lib\runpy.py", line 86, in run_code
exec(code, run_globals)
File "C:\Users\bsant\Pictures\lms_m16\venv\Scripts\pipreqs.exe_main.py", line 7, in
File "C:\Users\bsant\Pictures\lms_m16\venv\lib\site-packages\pipreqs\pipreqs.py", line 488, in main
init(args)
File "C:\Users\bsant\Pictures\lms_m16\venv\lib\site-packages\pipreqs\pipreqs.py", line 415, in init
candidates = get_all_imports(input_path,
File "C:\Users\bsant\Pictures\lms_m16\venv\lib\site-packages\pipreqs\pipreqs.py", line 131, in get_all_imports
raise exc
File "C:\Users\bsant\Pictures\lms_m16\venv\lib\site-packages\pipreqs\pipreqs.py", line 117, in get_all_imports
tree = ast.parse(contents)
File "C:\Users\bsant\AppData\Local\Programs\Python\Python310\lib\ast.py", line 50, in parse
return compile(source, filename, mode, flags,
File "", line 139
raise Exception, "Wrong geometry type: "+geometryType
^
SyntaxError: invalid syntax

Can't compile cython program using pyximport in Mac M1

I'm trying to use Cython (Cython version 0.29.30) to speed up my computations in Mac M1, and testing the .pyx by pyximport, but I got:
/Users/xxxx/.pyxbld/temp.macosx-10.9-universal2-3.10/pyrex/binomial.c:697:10: fatal error: 'ios' file not found
#include "ios"
^~~~~
1 error generated.
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/unixccompiler.py", line 117, in _compile
self.spawn(compiler_so + cc_args + [src, '-o', obj] +
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/ccompiler.py", line 910, in spawn
spawn(cmd, dry_run=self.dry_run)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/spawn.py", line 91, in spawn
raise DistutilsExecError(
distutils.errors.DistutilsExecError: command '/usr/bin/clang' failed with exit code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyximport.py", line 214, in load_module
so_path = build_module(module_name, pyxfilename, pyxbuild_dir,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyximport.py", line 186, in build_module
so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 529, in build_extension
objects = self.compiler.compile(sources,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
distutils.errors.CompileError: command '/usr/bin/clang' failed with exit code 1
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyximport.py", line 459, in load_module
module = load_module(fullname, self.path,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyximport.py", line 231, in load_module
raise exc.with_traceback(tb)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyximport.py", line 214, in load_module
so_path = build_module(module_name, pyxfilename, pyxbuild_dir,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyximport.py", line 186, in build_module
so_path = pyxbuild.pyx_to_dll(pyxfilename, extension_mod,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/pyximport/pyxbuild.py", line 102, in pyx_to_dll
dist.run_commands()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 966, in run_commands
self.run_command(cmd)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/dist.py", line 985, in run_command
cmd_obj.run()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 186, in run
_build_ext.build_ext.run(self)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 340, in run
self.build_extensions()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/site-packages/Cython/Distutils/old_build_ext.py", line 195, in build_extensions
_build_ext.build_ext.build_extensions(self)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 449, in build_extensions
self._build_extensions_serial()
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 474, in _build_extensions_serial
self.build_extension(ext)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/command/build_ext.py", line 529, in build_extension
objects = self.compiler.compile(sources,
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/ccompiler.py", line 574, in compile
self._compile(obj, src, ext, cc_args, extra_postargs, pp_opts)
File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/distutils/unixccompiler.py", line 120, in _compile
raise CompileError(msg)
ImportError: Building module binomial failed: ["distutils.errors.CompileError: command '/usr/bin/clang' failed with exit code 1\n"]
I'm quite new in Cython. When I ran cython xxx.pyx directly, it worked. The answers in this question are great help, but I was confused and sought for a better solution. I tried the first answer that tried to use C++ compiler:
>>> script_args = ["--cython-cplus"]
>>> setup_args = {"script_args": script_args}
>>> pyximport.install(setup_args=setup_args, language_level=3)
but got:
distutils.errors.DistutilsExecError: command '/usr/bin/clang++' failed with exit code 1
So I tried the second answer. It works fine. This means that I have to create a .pyxbld file for each .pyx file, which is quite annoying.
How can I solve this?

ConfigParser.NoSectionError: No section: 'main'

I installed habo malware hunter, but when i ran it,i got following errors:
habo#habo-VirtualBox:~/HaboMalHunter$ sudo python AnalyzeControl.py -z -l ./test_0813.zip Traceback (most recent call last):
File "AnalyzeControl.py", line 688, in <module>
ret = main(len(sys.argv), sys.argv)
File "AnalyzeControl.py", line 615, in main
cfg = init_arguments(argv)
File "AnalyzeControl.py", line 156, in init_arguments
cfg = init_cfg(args.config_path,args)
File "AnalyzeControl.py", line 96, in init_cfg
for k,v in conf_parser.items(SECTION_DEF):
File "/usr/lib/python2.7/ConfigParser.py", line 642, in items
raise NoSectionError(section)
ConfigParser.NoSectionError: No section: 'main'

Can't import AutoItLibrary from RIDE

I can install AutoItLibrary, while when import it from RIDE, it always shows red.
And the log file:
Traceback (most recent call last):
Initializing test library 'AutoItLibrary' with no arguments failed: com_error: (-2147024703, 'OLE error 0x800700c1', None, None)
Traceback (most recent call last):
File "C:\Python27\lib\site-packages\AutoItLibrary\__init__.py", line 79, in __init__
self._AutoIt = win32com.client.Dispatch("AutoItX3.Control")
File "C:\Python27\lib\site-packages\win32com\client\__init__.py", line 95, in Dispatch
dispatch, userName = dynamic._GetGoodDispatchAndUserName(dispatch,userName,clsctx)
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 114, in _GetGoodDispatchAndUserName
return (_GetGoodDispatch(IDispatch, clsctx), userName)
File "C:\Python27\lib\site-packages\win32com\client\dynamic.py", line 91, in _GetGoodDispatch
IDispatch = pythoncom.CoCreateInstance(IDispatch, None, clsctx, pythoncom.IID_IDispatch)
File "C:\Python27\lib\site-packages\robotide\spec\librarymanager.py", line 81, in _fetch_keywords
return get_import_result(path, library_args)
File "C:\Python27\lib\site-packages\robotide\spec\libraryfetcher.py", line 20, in get_import_result
lib = robotapi.TestLibrary(path, args)
File "C:\Python27\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 45, in TestLibrary
lib.create_handlers()
File "C:\Python27\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 102, in create_handlers
self.handlers = self._create_handlers(self.get_instance())
File "C:\Python27\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 163, in get_instance
self._libinst = self._get_instance()
File "C:\Python27\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 173, in _get_instance
self._raise_creating_instance_failed()
File "C:\Python27\lib\site-packages\robotide\lib\robot\running\testlibraries.py", line 227, in _raise_creating_instance_failed
% (self.name, args_text, msg, details))
Anyone can help?
Try to use ActivePython instead of standard distribution.
Reinstall also "pywin32" app.
This solved my problem.

Djangosphinx failed to read searchd response

The error is djangosphinx.models.SearchError: failed to read searchd response
(status=2613, ver=11825, len=775174445, read=75)
Does anyone know how to solve it?
root#haoran-Lenovo:~/wiscode/apps/question# python try.py
<SphinxQuerySet instance>
Traceback (most recent call last):
File "try.py", line 84, in <module>
print results[0]
File "/usr/local/lib/python2.6/dist-packages/django_sphinx-2.1.4-py2.6.egg/djangosphinx/models.py", line 266, in __getitem__
return self._get_data()[0]
File "/usr/local/lib/python2.6/dist-packages/django_sphinx-2.1.4-py2.6.egg/djangosphinx/models.py", line 400, in _get_data
self._result_cache = list(self._get_results())
File "/usr/local/lib/python2.6/dist-packages/django_sphinx-2.1.4-py2.6.egg/djangosphinx/models.py", line 526, in _get_results
results = self._get_sphinx_results()
File "/usr/local/lib/python2.6/dist-packages/django_sphinx-2.1.4-py2.6.egg/djangosphinx/models.py", line 513, in _get_sphinx_results
raise SearchError, client.GetLastError()
djangosphinx.models.SearchError: failed to read searchd response (status=2613, ver=11825, len=775174445, read=75)