cyberb commented on 15 Apr

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

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 commented on 30 Apr

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

commented

on 30 Apr

 

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'

 
 

Contributor

smacz42

commented

on 13 Jul

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

解决:File "/usr/lib/python2.7/site-packages/more_itertools/more.py", line 340 def _collate(*iterables, key=lambda a: a, reverse=False): 的报错的更多相关文章

  1. Exceeded maximum number of retries. Exceeded max scheduling attempts 3 for instance 7d90eb80-29e2-4238-b658-ade407ff9456. Last exception: [u'Traceback (most recent call last):\n', u' File "/usr/lib/py

    Exceeded maximum number of retries. Exceeded max scheduling attempts 3 for instance 7d90eb80-29e2-42 ...

  2. /usr/lib/python2.7/subprocess.py", line 1239, in _execute_child

    Traceback (most recent call last):File "/home/eping/bin/repo", line 685, in main(sys.argv[ ...

  3. linux安装软件时/usr/lib/python2.7/site-packages/urlgrabber/grabber.py文件异常

    linux安装软件时,经常出现以下异常信息 Traceback (most recent call last): File , in <module> main() File , in m ...

  4. 安装python File "/usr/bin/pip", line 11, in <module> sys.exit(main()) File "/usr/lib/python3.4/site-packages/pip/__init__.py", line 215, in main locale.setlocale(locale.LC_ALL, '') File "/u

      $ uname -a Linux debian 3.16.0-4-amd64 #1 SMP Debian 3.16.7-ckt11-1+deb8u6 (2015-11-09) x86_64 GNU ...

  5. /usr/lib/python2.7/site-packages/requests/__init__.py:91: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.2.1) doesn't match a supported version!

    /usr/lib/python2.7/site-packages/requests/ __init__.py:91: RequestsDependencyWarning: urllib3(1.22)或 ...

  6. python3 安装scrapy Exception: Traceback (most recent call last): File "/usr/lib/python3/dist-packages/pip/req/req_install.py", line 1006, in check_if_exists解决方法

    错误代码: Exception: Traceback (most recent call last): File , in check_if_exists self.satisfied_by = pk ...

  7. /usr/lib/python2.7/site-packages/requests/__init__.py:80: RequestsDependencyWarning: urllib3 (1.22) or chardet (2.2.1) doesn't match a supported version! RequestsDependencyWarning)

    [root@iZwz9bhan5nqzh979qokrkZ ~]# ansible all -m ping /usr/lib/python2.7/site-packages/requests/__in ...

  8. Linux Python import jenkins 报错 oserror: /usr/lib/python2.7/site-packages/lookup3.so

    安装了jenkins和Python-jenkins后,在脚本中import jenkins会报错:oserror: /usr/lib/python2.7/site-packages/lookup3.s ...

  9. 【pip uninstall 无法卸载】Not uninstalling numpy at /usr/lib/python2.7/dist-packages, outside environment /usr

    想卸载python的库numpy,执行pip uninstall gunicorn,报错如下: Not uninstalling numpy at /usr/lib/python2.7/dist-pa ...

随机推荐

  1. nfs实现k8s持久化

    1. 部署nfs服务端 k8s-master 节点上搭建了 NFS 服务器 (1)安装nfs服务: yum install -y nfs-utils rpcbind vim /etc/exports ...

  2. Haproxy 反向代理

    一.haproxy介绍 HAProxy是一个使用C语言编写的自由及开放源代码软件,其提供高可用性.负载均衡,以及基于TCP和HTTP的应用程序代理. 特点如下: .支持两种代理模式:TCP(四层)和H ...

  3. PAT 乙级 1006.换个格式输出整数 C++/Java

    1006 换个格式输出整数 (15 分) 题目来源 让我们用字母 B 来表示“百”.字母 S 表示“十”,用 12...n 来表示不为零的个位数字 n(n < 1000),换个格式来输出任一个不 ...

  4. fork以后子进程输出cout无法输出

    fork以后子进程输出cout无法输出 fork以后子进程输出cout无法输出 子进程 fork  cout<<"sdfsf"<<endl; 内容无法输出控 ...

  5. curl多线程下载类

    <?php /** * curl多线程下载类 */class MultiHttpRequest{ public $urls = array (); private $res = array () ...

  6. web万维网 -- 基础概念

    Web(万维网World Wide Web的简称)是个包罗万象的万花筒,不同的人从不同的角度观察,对于Web究竟是什么会得出大不相同的观点. 百科:web(World Wide Web)即全球广域网, ...

  7. Gamification and Game-Based Learning

    https://uwaterloo.ca/centre-for-teaching-excellence/teaching-resources/teaching-tips/educational-tec ...

  8. NSKeyedArchiver : NSCoder

    NSKeyedArchiver : NSCoder @interface NSData : NSObject <NSCopying, NSMutableCopying, NSSecureCodi ...

  9. vue.js不仅是一种模式,也是一种工程组织方式

    vue.js不仅是一种模式,也是一种工程组织方式

  10. Let Start

      A free timing software with very small memory occupation. This tool is a pure green convenient off ...