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

Unable to run when installing like described in the documentation #184

Open
flokli opened this issue Dec 2, 2016 · 4 comments
Open

Unable to run when installing like described in the documentation #184

flokli opened this issue Dec 2, 2016 · 4 comments

Comments

@flokli
Copy link

flokli commented Dec 2, 2016

I created a new virtualenv, and did a pip install localshop inside.

However, I'm unable to run localshop init as described in the docs:

$ localshop init
Traceback (most recent call last):
  File "/home/pypi/.venv/lib/python3.5/site-packages/django/conf/__init__.py", line 94, in __init__
    mod = importlib.import_module(self.SETTINGS_MODULE)
  File "/usr/lib/python3.5/importlib/__init__.py", line 126, in import_module
    return _bootstrap._gcd_import(name[level:], package, level)
  File "<frozen importlib._bootstrap>", line 986, in _gcd_import
  File "<frozen importlib._bootstrap>", line 969, in _find_and_load
  File "<frozen importlib._bootstrap>", line 958, in _find_and_load_unlocked
  File "<frozen importlib._bootstrap>", line 664, in _load_unlocked
  File "<frozen importlib._bootstrap>", line 634, in _load_backward_compatible
  File "/home/pypi/.venv/lib/python3.5/site-packages/configurations/importer.py", line 127, in load_module
    mod = imp.load_module(fullname, *self.location)
  File "/usr/lib/python3.5/imp.py", line 234, in load_module
    return load_source(name, filename, file)
  File "/usr/lib/python3.5/imp.py", line 172, in load_source
    module = _load(spec)
  File "<frozen importlib._bootstrap>", line 693, in _load
  File "<frozen importlib._bootstrap>", line 673, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 665, in exec_module
  File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
  File "/home/pypi/.venv/lib/python3.5/site-packages/localshop/settings.py", line 4, in <module>
    from celery.schedules import crontab
  File "/home/pypi/.venv/lib/python3.5/site-packages/celery/__init__.py", line 130, in <module>
    from celery import five
  File "/home/pypi/.venv/lib/python3.5/site-packages/celery/five.py", line 149, in <module>
    from kombu.utils.compat import OrderedDict  # noqa
  File "/home/pypi/.venv/lib/python3.5/site-packages/kombu/utils/__init__.py", line 19, in <module>
    from uuid import UUID, uuid4 as _uuid4, _uuid_generate_random
ImportError: cannot import name '_uuid_generate_random'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/home/pypi/.venv/bin/localshop", line 11, in <module>
    sys.exit(main())
  File "/home/pypi/.venv/lib/python3.5/site-packages/localshop/runner.py", line 12, in main
    execute_from_command_line(sys.argv)
  File "/home/pypi/.venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 385, in execute_from_command_line
    utility.execute()
  File "/home/pypi/.venv/lib/python3.5/site-packages/django/core/management/__init__.py", line 345, in execute
    settings.INSTALLED_APPS
  File "/home/pypi/.venv/lib/python3.5/site-packages/django/conf/__init__.py", line 46, in __getattr__
    self._setup(name)
  File "/home/pypi/.venv/lib/python3.5/site-packages/django/conf/__init__.py", line 42, in _setup
    self._wrapped = Settings(settings_module)
  File "/home/pypi/.venv/lib/python3.5/site-packages/django/conf/__init__.py", line 98, in __init__
    % (self.SETTINGS_MODULE, e)
ImportError: Could not import settings 'localshop.settings' (Is it on sys.path? Is there an import error in the settings file?): cannot import name '_uuid_generate_random'
@flokli flokli changed the title Unable to run when installing like in the documentation Unable to run when installing like described in the documentation Dec 2, 2016
@aiguofer
Copy link

encountering same issue, and this had been reported in #172 as well; still no solution

@mpounsett
Copy link

Since #172 is now closed, I'm reproducing my comments here:

This is still a problem with python 3.6.5 and 2.7.15. If I install kombu==3.0.30 (as suggested in #172) then the localshop.settings error goes away, but moves to something else.

python 3.6.5: AttributeError: module 'html.parser' has no attribute 'HTMLParseError'
python 2.7.15: django.core.exceptions.ImproperlyConfigured: Error loading either pysqlite2 or sqlite3 modules (tried in that order): No module named _sqlite3

@sposs
Copy link

sposs commented Jul 8, 2020

I'm afraid the current version in pypi is outdated and cannot work with python3...

@nzjustin
Copy link

I am dealing with this same issue. Upgrading kombu to 3.0.30 causes the HTMLParseError which is resolved by upgrading django from 1.7.1 => 1.8. This brings up a new error due to dropped python 2 compatibility:
ImportError: cannot import name 'LaxOptionParser'

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

5 participants