Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

start error #31

Open
cyberb opened this issue Apr 15, 2019 · 4 comments
Open

start error #31

cyberb opened this issue Apr 15, 2019 · 4 comments

Comments

@cyberb
Copy link
Contributor

cyberb commented Apr 15, 2019

Traceback (most recent call last): 
File "/snap/users/x1/python/bin/ldapcherryd", line 11, in <module> 
load_entry_point('ldapcherry==1.1.1', 'console_scripts', 'ldapcherryd')() 
File "/snap/users/x1/python/lib/python2.7/site-packages/pkg_resources/__init__.py", line 487, in load_entry_point 
return get_distribution(dist).load_entry_point(group, name) 
File "/snap/users/x1/python/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2728, in load_entry_point 
return ep.load() 
File "/snap/users/x1/python/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2346, in load 
return self.resolve() 
File "/snap/users/x1/python/lib/python2.7/site-packages/pkg_resources/__init__.py", line 2352, in resolve 
module = __import__(self.module_name, fromlist=['__name__'], level=0) 
File "/snap/users/x1/python/lib/python2.7/site-packages/ldapcherry-1.1.1-py2.7.egg/ldapcherry/__init__.py", line 19, in <module> 
from ldapcherry.exceptions import * 
File "/snap/users/x1/python/lib/python2.7/site-packages/ldapcherry-1.1.1-py2.7.egg/ldapcherry/exceptions.py", line 9, in <module> 
import cherrypy 
File "/snap/users/x1/python/lib/python2.7/site-packages/CherryPy-17.4.1-py2.7.egg/cherrypy/__init__.py", line 66, in <module> 
from ._cperror import ( 
File "/snap/users/x1/python/lib/python2.7/site-packages/CherryPy-17.4.1-py2.7.egg/cherrypy/_cperror.py", line 129, in <module> 
from more_itertools import always_iterable 
File "build/bdist.linux-x86_64/egg/more_itertools/__init__.py", line 1, in <module> 
File "/snap/users/x1/python/lib/python2.7/site-packages/more_itertools-7.0.0-py2.7.egg/more_itertools/more.py", line 333 
def _collate(*iterables, key=lambda a: a, reverse=False): 
^ 
SyntaxError: invalid syntax

Maybe related to: https://stackoverflow.com/questions/54648246/invalid-syntax-in-more-itertools-when-running-pytest

@smacz42
Copy link
Contributor

smacz42 commented Apr 19, 2019

I can confirm that requiring a more-itertools dependency that is less than 6.0.0 is required to fix this issue when using Python 2. There is a python3 branch to LdapCherry, and I don't know if the migration is going to be soon, or if the maintainer plans to maintain two versions.

@vishwakumba
Copy link

I also obtained the same error while starting ldapcherry

[root@ldapcherry scripts]# ldapcherryd -c /etc/ldapcherry/ldapcherry.ini -D
Traceback (most recent call last):
File "/bin/ldapcherryd", line 9, in
load_entry_point('ldapcherry==1.1.1', 'console_scripts', 'ldapcherryd')()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 378, in load_entry_point
return get_distribution(dist).load_entry_point(group, name)
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2566, in load_entry_point
return ep.load()
File "/usr/lib/python2.7/site-packages/pkg_resources.py", line 2260, in load
entry = import(self.module_name, globals(),globals(), ['name'])
File "/usr/lib/python2.7/site-packages/ldapcherry/init.py", line 19, in
from ldapcherry.exceptions import *
File "/usr/lib/python2.7/site-packages/ldapcherry/exceptions.py", line 9, in
import cherrypy
File "/usr/lib/python2.7/site-packages/cherrypy/init.py", line 66, in
from ._cperror import (
File "/usr/lib/python2.7/site-packages/cherrypy/_cperror.py", line 129, in
from more_itertools import always_iterable
File "/usr/lib/python2.7/site-packages/more_itertools/init.py", line 1, in
from more_itertools.more import * # noqa
File "/usr/lib/python2.7/site-packages/more_itertools/more.py", line 333
def _collate(*iterables, key=lambda a: a, reverse=False):
^
SyntaxError: invalid syntax

@vishwakumba
Copy link

vishwakumba commented Apr 30, 2019

The foll. workaround seems to resolve this issue: (CentOS 7.2/Python 2.7.5 and ldapcherry 1.1.1)

$ pip install 'more-itertools<=5.0.0'

@smacz42
Copy link
Contributor

smacz42 commented Jul 13, 2019

This is the correct fix. This issue should be marked as closed.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants