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

ImportError: Could not import settings 'localshop.settings' #172

Closed
yytj17 opened this issue Feb 2, 2016 · 7 comments
Closed

ImportError: Could not import settings 'localshop.settings' #172

yytj17 opened this issue Feb 2, 2016 · 7 comments

Comments

@yytj17
Copy link

yytj17 commented Feb 2, 2016

Could you please help me with this:

C:\Users\Administrator>localshop
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:\Python27\Scripts\localshop.exe__main
.py", line 9, in
File "c:\python27\lib\site-packages\localshop\runner.py", line 12, in main
execute_from_command_line(sys.argv)
File "c:\python27\lib\site-packages\django\core\management__init__.py", line 385, in execute_from_command_line
utility.execute()
File "c:\python27\lib\site-packages\django\core\management__init__.py", line 345, in execute
settings.INSTALLED_APPS
File "c:\python27\lib\site-packages\django\conf__init__.py", line 46, in getattr
self.setup(name)
File "c:\python27\lib\site-packages\django\conf__init
_.py", line 42, in setup
self.wrapped = Settings(settings_module)
File "c:\python27\lib\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

@yytj17
Copy link
Author

yytj17 commented Feb 2, 2016

I follow the installing docs and the second step is "localshop init", then this Error happens.

@canassa
Copy link
Collaborator

canassa commented Feb 2, 2016

Thanks for the report. Could you post the output of python --version?

@yytj17
Copy link
Author

yytj17 commented Feb 2, 2016

Oh, I've got the solution from google:
http://stackoverflow.com/questions/34198538/cannot-import-name-uuid-generate-random-in-heroku-django

It's module "kombu(3.0.24)". When I update it to latest(3.0.33), the issue doesn't exist anymore.
Thanks.

@yytj17 yytj17 closed this as completed Feb 2, 2016
@yytj17
Copy link
Author

yytj17 commented Feb 2, 2016

BTW, the version of python is 2.7.11.

@morganthrapp
Copy link

morganthrapp commented Sep 13, 2016

Can this be reopened? I can confirm this still happens.

Steps to reproduce:

  1. Create virtual environment with Python 3.5.1 on Windows 10.
  2. Run pip install localshop.
  3. Run localshop init.

The fix is to install kombu >= 3.0.30. Can this be added to the project requirements?

@gangh
Copy link

gangh commented Jun 1, 2018

this error still happens when i follow the installing docs.
And this operation solved this error:

pip install -r reqirements.txt

try this
(with python 3.5)
There are mistakes in setup install requires.

@mpounsett
Copy link

This is still a problem with python 3.6.5 and 2.7.15. If I install kombu==3.0.30 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

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