You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I have the following error when I run make test at the current HEAD version (c553375) of this project on an Amazon Linux 2 VM in a python venv:
$ make test
...
running build_ext
Traceback (most recent call last):
File "setup.py", line 50, in <module>
'Programming Language :: Python :: 3.4',
File "/home/ec2-user/certbot-venv/venv/lib/python2.7/site-packages/setuptools/__init__.py", line 162, in setup
return distutils.core.setup(**attrs)
File "/usr/lib64/python2.7/distutils/core.py", line 151, in setup
dist.run_commands()
File "/usr/lib64/python2.7/distutils/dist.py", line 953, in run_commands
self.run_command(cmd)
File "/usr/lib64/python2.7/distutils/dist.py", line 972, in run_command
cmd_obj.run()
File "/home/ec2-user/certbot-venv/venv/lib/python2.7/site-packages/setuptools/command/test.py", line 237, in run
self.run_tests()
File "/home/ec2-user/certbot-venv/venv/lib/python2.7/site-packages/setuptools/command/test.py", line 259, in run_tests
exit=False,
File "/usr/lib64/python2.7/unittest/main.py", line 94, in __init__
self.parseArgs(argv)
File "/usr/lib64/python2.7/unittest/main.py", line 149, in parseArgs
self.createTests()
File "/usr/lib64/python2.7/unittest/main.py", line 158, in createTests
self.module)
File "/usr/lib64/python2.7/unittest/loader.py", line 130, in loadTestsFromNames
suites = [self.loadTestsFromName(name, module) for name in names]
File "/usr/lib64/python2.7/unittest/loader.py", line 103, in loadTestsFromName
return self.loadTestsFromModule(obj)
File "/home/ec2-user/certbot-venv/venv/lib/python2.7/site-packages/setuptools/command/test.py", line 55, in loadTestsFromModule
tests.append(self.loadTestsFromName(submodule))
File "/usr/lib64/python2.7/unittest/loader.py", line 91, in loadTestsFromName
module = __import__('.'.join(parts_copy))
File "/home/ec2-user/certbot-venv/parsedatetime-master/tests/TestAlternativeAbbreviations.py", line 16, in <module>
pdtLocale_en = get_icu('en_US')
File "/home/ec2-user/certbot-venv/parsedatetime-master/parsedatetime/pdt_locales/icu.py", line 56, in get_icu
result['icu'] = icu = pyicu.Locale(locale)
AttributeError: 'module' object has no attribute 'Locale'
make: *** [test] Error 1
I believe that the "import icu as pyicu" line here is importing itself. I don't understand why this affects me and not other users, or how this is meant to work.
Here is a full repro:
$ sudo bash
# cat /etc/*release
NAME="Amazon Linux"
VERSION="2"
ID="amzn"
ID_LIKE="centos rhel fedora"
VERSION_ID="2"
PRETTY_NAME="Amazon Linux 2"
ANSI_COLOR="0;33"
CPE_NAME="cpe:2.3:o:amazon:amazon_linux:2"
HOME_URL="https://amazonlinux.com/"
Amazon Linux release 2 (Karoo)
# yum install -y git python-pip
# pip install virtualenv pipenv
# virtualenv venv
# source venv/bin/activate
...
# git clone https://github.com/bear/parsedatetime.git && cd parsedatetime
...
# make test
...
AttributeError: 'module' object has no attribute 'Locale'
Hopefully your PR will get merged and released soon. I think there are lots of people still using Python 2, often without explicitly choosing to do so but via provided systems like Amazon Linux 2.
I have the following error when I run
make test
at the current HEAD version (c553375) of this project on an Amazon Linux 2 VM in a python venv:I believe that the "
import icu as pyicu
" line here is importing itself. I don't understand why this affects me and not other users, or how this is meant to work.Here is a full repro:
The following patch fixes this issue for me:
I encountered this when trying to run
certbot
.Can anyone explain what has gone wrong here? Is this a bug in
parsedatetime
or in Amazon Linux 2?Is there a better workaround than applying the above patch to my
site-packages
?Thanks,
Rich
The text was updated successfully, but these errors were encountered: