Problem installing neo4j.py - python

I have followed the instructions here and for some reason I am getting the following traceback:
root#ubuntu:~/Downloads/neo4j-python# python setup.py install
Traceback (most recent call last):
File "setup.py", line 146, in <module>
main()
File "setup.py", line 134, in main
args[attr] = pom[attr]
File "/home/omer/Downloads/neo4j-python/pom.py", line 58, in __getitem__
element)
File "/home/omer/Downloads/neo4j-python/pom.py", line 57, in <lambda>
return self.pattern.sub(lambda match:self[match.groupdict()['var']],
File "/home/omer/Downloads/neo4j-python/pom.py", line 54, in __getitem__
element = self.parent[path]
File "/home/omer/Downloads/neo4j-python/pom.py", line 91, in __getitem__
return replacement.get(path, lambda s,x:x)(self, self.__pom[path])
File "/home/omer/Downloads/neo4j-python/pom.py", line 56, in __getitem__
raise KeyError(path)
KeyError: 'project.artifactId'
Has anyone encountered this issue? I am running ubuntu 11.04 and python 2.7.1.

Found the answer on serverfualt.
See the issue here.

Related

How to fix this error in Pyttsx3: KeyError: 'VoiceAge'

I installed Pyttsx3 with mamba on Mac OS. All was working fine.
Then I upgraded to Mac OS Ventura 13.01 and I get an error on this minimal working example:
import pyttsx3
engine = pyttsx3.init()
engine.getProperty('voices')
The third line throws an error. Any ideas on why I get this error and how to fix it?:
Traceback (most recent call last):
File "<stdin>", line 1, in <module>
File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/pyttsx3/engine.py", line 146, in getProperty
return self.proxy.getProperty(name)
File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/pyttsx3/driver.py", line 173, in getProperty
return self._driver.getProperty(name)
File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/pyttsx3/drivers/nsss.py", line 69, in getProperty
return [self._toVoice(NSSpeechSynthesizer.attributesForVoice_(v))
File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/pyttsx3/drivers/nsss.py", line 69, in <listcomp>
return [self._toVoice(NSSpeechSynthesizer.attributesForVoice_(v))
File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/pyttsx3/drivers/nsss.py", line 64, in _toVoice
attr['VoiceAge'])
File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/objc/_convenience_mapping.py", line 18, in __getitem__objectForKey_
return container_unwrap(res, KeyError, key)
File "/Users/fdiacobe/opt/miniconda3/lib/python3.9/site-packages/objc/_convenience.py", line 122, in container_unwrap
raise exc_type(*exc_args)
KeyError: 'VoiceAge'

conversion of .py to .exe using auto-py-to-exe showing error

I want to convert .py to .exe. For that I got to know that auto-py-to-exe is simple and works for Python >= 2.7 ( including 3.7 🎉 ). When I tried to convert a simple application it worked smoothly (auto-py-exe is working ) . But when I try to convert my original python scripts its throwing error:
An error occurred, traceback follows:
Traceback (most recent call last):
File "c:\users\lab_pc\anaconda3\lib\site-packages\win32ctypes\pywin32\pywintypes.py", line 35, in pywin32error
yield
File "c:\users\lab_pc\anaconda3\lib\site-packages\win32ctypes\pywin32\win32api.py", line 43, in LoadLibraryEx
return _dll._LoadLibraryEx(fileName, 0, flags)
File "c:\users\lab_pc\anaconda3\lib\site-packages\win32ctypes\core\cffi\_dll.py", line 26, in _LoadLibraryEx
function_name='LoadLibraryEx')
File "c:\users\lab_pc\anaconda3\lib\site-packages\win32ctypes\core\cffi\_util.py", line 81, in __call__
self._raise_error(function_name)
File "c:\users\lab_pc\anaconda3\lib\site-packages\win32ctypes\core\cffi\_util.py", line 92, in _raise_error
raise exception
OSError: [WinError 2] The system cannot find the file specified
Its my first time converting a code into .exe so I have no idea what to do now (excepting searching on web). I don't even know what is causing this error. I have doubt on mayavi but not sure. Anyhelp will be highly welcomed.
Program: python 3.7
GUI : PyQt5
Libraries included: mayavi,opencv,matplotlib,PIL,pylab,scipy,etc
Command to convert: pyinstaller -y "path_to_script.py"
Edits:
I'm sure its due to mayavi as the simplest code attached didn't convert into .exe ( Sorry for lengthy post ! )
Its due to mayavi but I still want solution for this, Thanks in advance for any suggestions.
Code:
import numpy as np
from mayavi.mlab import contour3d
from mayavi import mlab
x, y, z = np.ogrid[-3:3:60j, -3:3:60j, -3:3:60j]
H1 = 0.45+x**2+y**2-z**2
obj1 = contour3d(H1, contours=[0], transparent=False)
mlab.show()
Command to convert: pyinstaller -y "path_to_script.py"
Error:
An error occurred, traceback follows:
Traceback (most recent call last):
File "c:\users\lab_pc\anaconda3\lib\site-packages\win32ctypes\pywin32\pywintypes.py", line 35, in pywin32error
yield
File "c:\users\lab_pc\anaconda3\lib\site-packages\win32ctypes\pywin32\win32api.py", line 43, in LoadLibraryEx
return _dll._LoadLibraryEx(fileName, 0, flags)
File "c:\users\lab_pc\anaconda3\lib\site-packages\win32ctypes\core\cffi\_dll.py", line 26, in _LoadLibraryEx
function_name='LoadLibraryEx')
File "c:\users\lab_pc\anaconda3\lib\site-packages\win32ctypes\core\cffi\_util.py", line 81, in __call__
self._raise_error(function_name)
File "c:\users\lab_pc\anaconda3\lib\site-packages\win32ctypes\core\cffi\_util.py", line 92, in _raise_error
raise exception
OSError: [WinError 2] The system cannot find the file specified
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "c:\users\lab_pc\anaconda3\lib\site-packages\auto_py_to_exe\__main__.py", line 269, in convert
pyi.run() # Execute PyInstaller
File "c:\users\lab_pc\anaconda3\lib\site-packages\PyInstaller\__main__.py", line 111, in run
run_build(pyi_config, spec_file, **vars(args))
File "c:\users\lab_pc\anaconda3\lib\site-packages\PyInstaller\__main__.py", line 63, in run_build
PyInstaller.building.build_main.main(pyi_config, spec_file, **kwargs)
File "c:\users\lab_pc\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 844, in main
build(specfile, kw.get('distpath'), kw.get('workpath'), kw.get('clean_build'))
File "c:\users\lab_pc\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 791, in build
exec(code, spec_namespace)
File "C:\Users\lab_pc\AppData\Local\Temp\tmp_0mronij\stackoverflow_ask_py2exe.spec", line 17, in <module>
noarchive=False)
File "c:\users\lab_pc\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 243, in __init__
self.__postinit__()
File "c:\users\lab_pc\anaconda3\lib\site-packages\PyInstaller\building\datastruct.py", line 158, in __postinit__
self.assemble()
File "c:\users\lab_pc\anaconda3\lib\site-packages\PyInstaller\building\build_main.py", line 567, in assemble
redirects=self.binding_redirects))
File "c:\users\lab_pc\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 231, in Dependencies
for ftocnm, fn in getAssemblyFiles(pth, manifest, redirects):
File "c:\users\lab_pc\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 407, in getAssemblyFiles
for assembly in getAssemblies(pth):
File "c:\users\lab_pc\anaconda3\lib\site-packages\PyInstaller\depend\bindepend.py", line 358, in getAssemblies
res = GetManifestResources(pth)
File "c:\users\lab_pc\anaconda3\lib\site-packages\PyInstaller\utils\win32\winmanifest.py", line 1005, in GetManifestResources
return winresource.GetResources(filename, [RT_MANIFEST], names, languages)
File "c:\users\lab_pc\anaconda3\lib\site-packages\PyInstaller\utils\win32\winresource.py", line 168, in GetResources
hsrc = win32api.LoadLibraryEx(filename, 0, LOAD_LIBRARY_AS_DATAFILE)
File "c:\users\lab_pc\anaconda3\lib\site-packages\win32ctypes\pywin32\win32api.py", line 43, in LoadLibraryEx
return _dll._LoadLibraryEx(fileName, 0, flags)
File "c:\users\lab_pc\anaconda3\lib\contextlib.py", line 130, in __exit__
self.gen.throw(type, value, traceback)
File "c:\users\lab_pc\anaconda3\lib\site-packages\win32ctypes\pywin32\pywintypes.py", line 37, in pywin32error
raise error(exception.winerror, exception.function, exception.strerror)
win32ctypes.pywin32.pywintypes.error: (2, 'LoadLibraryEx', 'The system cannot find the file specified')
Project output will not be moved to output folder
Complete.
Should I use some different tool to convert? (Suggestions please in context to my problem).
Thanks

jupyter notebook setup failed with “TypeError: __call__() takes exactly 2 arguments (1 given)”

I installed jupiter with pip and run
jupyter notebook
Then I got this mistakes:
Traceback (most recent call last):
File "/usr/local/bin/jupyter-notebook", line 11, in <module>
sys.exit(main())
File "/Library/Python/2.7/site-packages/jupyter_core/application.py", line 267, in launch_instance
return super(JupyterApp, cls).launch_instance(argv=argv, **kwargs)
File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 657, in launch_instance
app.initialize(argv)
File "<decorator-gen-7>", line 2, in initialize
File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/notebook/notebookapp.py", line 1136, in initialize
super(NotebookApp, self).initialize(argv)
File "<decorator-gen-6>", line 2, in initialize
File "/Library/Python/2.7/site-packages/traitlets/config/application.py", line 87, in catch_config_error
return method(app, *args, **kwargs)
File "/Library/Python/2.7/site-packages/jupyter_core/application.py", line 243, in initialize
self.migrate_config()
File "/Library/Python/2.7/site-packages/jupyter_core/application.py", line 162, in migrate_config
from .migrate import get_ipython_dir, migrate
File "/Library/Python/2.7/site-packages/jupyter_core/migrate.py", line 35, in <module>
from IPython.paths import get_ipython_dir
File "/Library/Python/2.7/site-packages/IPython/__init__.py", line 49, in <module>
from .terminal.embed import embed
File "/Library/Python/2.7/site-packages/IPython/terminal/embed.py", line 18, in <module>
from IPython.terminal.interactiveshell import TerminalInteractiveShell
File "/Library/Python/2.7/site-packages/IPython/terminal/interactiveshell.py", line 93, in <module>
class TerminalInteractiveShell(InteractiveShell):
File "/Library/Python/2.7/site-packages/IPython/terminal/interactiveshell.py", line 138, in TerminalInteractiveShell
highlighting: \n %s""" % ', '.join(get_all_styles())
File "/Library/Python/2.7/site-packages/pygments/styles/__init__.py", line 79, in get_all_styles
for name, _ in find_plugin_styles():
File "/Library/Python/2.7/site-packages/pygments/plugin.py", line 62, in find_plugin_styles
for entrypoint in iter_entry_points(STYLE_ENTRY_POINT):
File "/Library/Python/2.7/site-packages/pygments/plugin.py", line 45, in iter_entry_points
import pkg_resources
File "/Library/Python/2.7/site-packages/pkg_resources/__init__.py", line 72, in <module>
import packaging.requirements
File "/Library/Python/2.7/site-packages/packaging/requirements.py", line 59, in <module>
MARKER_EXPR = originalTextFor(MARKER_EXPR())("marker")
TypeError: __call__() takes exactly 2 arguments (1 given)
Anyone know how to fix it?
I have searched it on google, but nothing is helpful on this particular issue.
I was facing the same problem but only in one of the two virtualenv on my machine. I had latest pip and same version of jupyter in both environments running on Python-2.7.9
Upon searching more, I found a similar issue which suggested using a specific version of setuptools
pip install setuptools==33.1.1
My setuptools version was setuptools-34.2.0 earlier.
At first I use python 2.7.10 , which will call the mistake. After change the version of python to 2.7.13 and reinstall jupyter, the problem is fixed:)
May be is easy, but really helpful!

dogpile.cache 'No module named fcntl' error

I'm using Python 2.7 with SQLAlchemy.
I'm trying to see if I can use Dogpile.Cache.
I've installed dogpile cache using
pip install dogpile.cache
but when I try to run the example given by SQLAlchemy (helloworld.py)
I keep getting ImportError: No module named fcntl. I thought the newest Dogpile.Cache resolved the windows issue...
Could someone please help?
Thank you.
UPDATE
Ok, the example is creating the database and cache. But when it is trying to load data using FromCache it is giving me an error.
people = Session.query(Person).options(FromCache("default")).all()
Here is the Traceback
Traceback (most recent call last):
File "C:\Python27\lib\runpy.py", line 162, in _run_module_as_main
"__main__", fname, loader, pkg_name)
File "C:\Python27\lib\runpy.py", line 72, in _run_code
exec code in run_globals
File "C:\Users\JKIM\Downloads\DogpileCacheTest\examples\dogpile_caching\helloworld.py", line 13, in <module>
people = Session.query(Person).options(FromCache("default")).all()
File "build\bdist.win-amd64\egg\sqlalchemy\orm\query.py", line 2613, in all
File "examples\caching_query.py", line 63, in __iter__
return self.get_value(createfunc=lambda: list(Query.__iter__(self)))
File "examples\caching_query.py", line 108, in get_value
expiration_time=expiration_time
File "C:\Python27\lib\site-packages\dogpile\cache\region.py", line 657, in get_or_create
async_creator) as value:
File "C:\Python27\lib\site-packages\dogpile\lock.py", line 154, in __enter__
return self._enter()
File "C:\Python27\lib\site-packages\dogpile\lock.py", line 87, in _enter
value = value_fn()
File "C:\Python27\lib\site-packages\dogpile\cache\region.py", line 610, in get_value
value = self.backend.get(key)
File "C:\Python27\lib\site-packages\dogpile\cache\backends\file.py", line 220, in get
with self._dbm_file(False) as dbm:
File "C:\Python27\lib\contextlib.py", line 17, in __enter__
return self.gen.next()
File "C:\Python27\lib\site-packages\dogpile\cache\backends\file.py", line 212, in _dbm_file
with self._use_rw_lock(write):
File "C:\Python27\lib\contextlib.py", line 17, in __enter__
return self.gen.next()
File "C:\Python27\lib\site-packages\dogpile\cache\backends\file.py", line 207, in _use_rw_lock
with self._rw_lock.read():
File "C:\Python27\lib\contextlib.py", line 17, in __enter__
return self.gen.next()
File "C:\Python27\lib\site-packages\dogpile\cache\backends\file.py", line 327, in read
self.acquire_read_lock(True)
File "C:\Python27\lib\site-packages\dogpile\cache\backends\file.py", line 408, in acquire_read_lock
return self._acquire(wait, os.O_RDONLY, self._module.LOCK_SH)
File "C:\Python27\lib\site-packages\dogpile\util\langhelpers.py", line 63, in __get__
obj.__dict__[self.__name__] = result = self.fget(obj)
File "C:\Python27\lib\site-packages\dogpile\cache\backends\file.py", line 400, in _module
import fcntl
ImportError: No module named fcntl

Launching nose with --with-gae option raises ValueError for missing lib/ipaddr

Setting up the testing framework and I can't seem to get past this error:
Traceback (most recent call last):
File "/usr/local/bin/nosetests", line 8, in <module>
load_entry_point('nose==1.1.2', 'console_scripts', 'nosetests')()
File "/Library/Python/2.7/site-packages/nose-1.1.2-py2.7.egg/nose/core.py", line 118, in __init__
**extra_args)
File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
File "/Library/Python/2.7/site-packages/nose-1.1.2-py2.7.egg/nose/core.py", line 135, in parseArgs
self.config.configure(argv, doc=self.usage())
File "/Library/Python/2.7/site-packages/nose-1.1.2-py2.7.egg/nose/config.py", line 338, in configure
self.plugins.configure(options, self)
File "/Library/Python/2.7/site-packages/nose-1.1.2-py2.7.egg/nose/plugins/manager.py", line 271, in configure
cfg(options, config)
File "/Library/Python/2.7/site-packages/nose-1.1.2-py2.7.egg/nose/plugins/manager.py", line 94, in __call__
return self.call(*arg, **kw)
File "/Library/Python/2.7/site-packages/nose-1.1.2-py2.7.egg/nose/plugins/manager.py", line 162, in simple
result = meth(*arg, **kw)
File "build/bdist.macosx-10.7-intel/egg/nosegae.py", line 80, in configure
File "/usr/local/bin/dev_appserver.py", line 76, in <module>
DIR_PATH = get_dir_path(os.path.join('lib', 'ipaddr'))
File "/usr/local/bin/dev_appserver.py", line 66, in get_dir_path
'file and %s.' % sibling)
ValueError: Could not determine directory that contains both, this file and lib/ipaddr.
It's a correct error coming from dev_appserver.py... there is no lib/ipaddr in the /usr/local/bin directory.
Why is nosetests triggering the raising of this error? Why does dev_appengine try to look for lib/ipaddr in the first place?

Categories