jpadilla / django-rest-framework-xml

XML support for Django REST Framework
http://jpadilla.github.io/django-rest-framework-xml
BSD 3-Clause "New" or "Revised" License
86 stars 59 forks source link

Python 3.6 Django 1.11 manage.py (<frozen importlib._bootstrap>", line 978, in _gcd_import) #21

Closed ejdenh closed 7 years ago

ejdenh commented 7 years ago

What's wrong? can someone help me?

In the settings.py (INSTALLED_APPS) I'm unable to add apps.!! {{{ C:\Users\Administrator\PycharmProjects\website>python manage.py makemigrations Traceback (most recent call last): File "manage.py", line 22, in execute_from_command_line(sys.argv) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management__init__.py", line 363, in execute_from_command_line utility.execute() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\core\management__init.py", line 337, in execute django.setup() File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\init.py", line 27, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\apps\registry.py", line 85, in populate app_config = AppConfig.create(entry) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\site-packages\django\apps\config.py", line 120, in create mod = import_module(mod_path) File "C:\Users\Administrator\AppData\Local\Programs\Python\Python36-32\lib\importlib\init__.py", line 126, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 978, in _gcd_import File "", line 961, in _find_and_load File "", line 936, in _find_and_load_unlocked File "", line 205, in _call_with_frames_removed File "", line 978, in _gcd_import File "", line 961, in _find_and_load File "", line 948, in _find_and_load_unlocked ModuleNotFoundError: No module named 'rest_frameworkcompanies' }}}

jpadilla commented 7 years ago

@ejdenh do you have an app called rest_frameworkcompanies? Perhaps there's a missing comma after rest_framework.

ejdenh commented 7 years ago

Thanks for replay I am quite new with Python and django. But the strange thing is that. If i add apps in settings file there is no autofill so a have two type everthing in INSTALLED APPS.

So a have no module named 'rest_frameworkcompanies'

I follow this https://youtu.be/Yw7gETuRKjw?list=PL6gx4Cwl9DGBlmzzFcLgDhKTTfNLfX1IK&t=236 (see autofill in youtube fill)

INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework' 'companies.apps.CompaniesConfig' ]

Thanks

jr177 commented 5 years ago

How did you solve this?

Russell-Jones-OxPhys commented 5 years ago
[
...
'rest_framework'
'companies.apps.CompaniesConfig'
]

causes the strings to be joined into one, "'rest_frameworkcompanies.apps.CompaniesConfig". There's a missing comma, as Jose Padilla suggested.

shadimsh commented 5 years ago

i think you missed to put comma in each additional apps corrected is : 'rest_framework', 'companies.apps.CompaniesConfig',

saladgg commented 5 years ago

For a third party package, you may have to install it globally on your system even after adding to your virtual env. compX:/#pip install packagename

sorXCode commented 5 years ago

As pointed out by @jpadilla, Don't forget the trailing comma (,). solved mine. INSTALLED_APPS = [ 'django.contrib.admin', 'django.contrib.auth', 'django.contrib.contenttypes', 'django.contrib.sessions', 'django.contrib.messages', 'django.contrib.staticfiles', 'rest_framework', 'companies.apps.CompaniesConfig', ]

zainkhaliq172 commented 4 years ago

Traceback (most recent call last): File "manage.py", line 21, in main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "C:\Users\ALIZAI~1\myvenv\lib\site-packages\django\core\management__init.py", line 381, in execute_from_command_line utility.execute() File "C:\Users\ALIZAI~1\myvenv\lib\site-packages\django\core\management__init.py", line 357, in execute django.setup() File "C:\Users\ALIZAI~1\myvenv\lib\site-packages\django\init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Users\ALIZAI~1\myvenv\lib\site-packages\django\apps\registry.py", line 91, in populate app_config = AppConfig.create(entry) File "C:\Users\ALIZAI~1\myvenv\lib\site-packages\django\apps\config.py", line 90, in create module = import_module(entry) File "C:\Users\ALIZAI~1\myvenv\lib\importlib\init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named 'corsheaders'

what's the problem is that .i don't understand it.

sorXCode commented 4 years ago

Are you working in a virtual env? If so, ensure you active the environment and have django-CORS-headers installed before running command

abdo907 commented 4 years ago

same problem with me but the solutio is not working for me. i dont have a missing comma

sorXCode commented 4 years ago

@abdo907 Are you working in a virtual env? If so, ensure you activated the environment and have django-CORS-headers installed in the environment before running the command

Tech-Sec commented 4 years ago

(project1_env) C:\Users\HI\Desktop\django_project>python manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Users\HI\AppData\Local\Programs\Python\Python38-32\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\Users\HI\AppData\Local\Programs\Python\Python38-32\lib\threading.py", line 870, in run self._target(*self._args, self._kwargs) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(*args, *kwargs) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\core\management\commands\runserver.py", line 109, in inner_run autoreload.raise_last_exception() File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\utils\autoreload.py", line 76, in raise_last_exception raise _exception[1] File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\core\management__init__.py", line 357, in execute autoreload.check_errors(django.setup)() File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(args, kwargs) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django__init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\apps\registry.py", line 91, in populate app_config = AppConfig.create(entry) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\apps\config.py", line 116, in create mod = import_module(mod_path) File "C:\Users\HI\AppData\Local\Programs\Python\Python38-32\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 961, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module named 'user' Traceback (most recent call last): File "manage.py", line 21, in main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\core\management\init.py", line 401, in execute_from_command_line utility.execute() File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\core\management\init__.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\core\management\base.py", line 328, in run_from_argv self.execute(*args, cmd_options) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\core\management\commands\runserver.py", line 60, in execute super().execute(*args, *options) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\core\management\base.py", line 369, in execute output = self.handle(args, options) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\core\management\commands\runserver.py", line 95, in handle self.run(options) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\core\management\commands\runserver.py", line 102, in run autoreload.run_with_reloader(self.inner_run, options) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\utils\autoreload.py", line 599, in run_with_reloader start_django(reloader, main_func, *args, **kwargs) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\utils\autoreload.py", line 584, in start_django reloader.run(django_main_thread) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\utils\autoreload.py", line 299, in run self.run_loop() File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\utils\autoreload.py", line 305, in run_loop next(ticker) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\utils\autoreload.py", line 345, in tick for filepath, mtime in self.snapshot_files(): File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\utils\autoreload.py", line 361, in snapshot_files for file in self.watched_files(): File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\utils\autoreload.py", line 260, in watched_files yield from iter_all_python_module_files() File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\utils\autoreload.py", line 105, in iter_all_python_module_files return iter_modules_and_files(modules, frozenset(_error_files)) File "C:\Users\HI\Environments\project1_env\lib\site-packages\django\utils\autoreload.py", line 141, in iter_modules_and_files resolved_path = path.resolve(strict=True).absolute() File "C:\Users\HI\AppData\Local\Programs\Python\Python38-32\lib\pathlib.py", line 1177, in resolve s = self._flavour.resolve(self, strict=strict) File "C:\Users\HI\AppData\Local\Programs\Python\Python38-32\lib\pathlib.py", line 200, in resolve return self._ext_to_normal(_getfinalpathname(s)) OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: ''

can someone help me out?

Tech-Sec commented 4 years ago

ok solved

anushkaarora commented 4 years ago

ved

hey! how did u solve it?

cjrzs commented 4 years ago

how to solve

chichur commented 4 years ago

how?

chichur commented 4 years ago

Guys, I found solution. You make sure, that name yours app in SETTINGS.py INSTALLED_APPS typed correct.

sahil067 commented 4 years ago

OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '' how to sove this issue

sahil067 commented 4 years ago

OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '' how to solve this issue

AabhaJahagirdar commented 4 years ago

OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: ''

Please solve this error

guzmanojero commented 3 years ago

This is similar to something that happened to me.

After checking the traceback message I've noticed the following:

File...       
ModuleNotFoundError: No module named '<app_name>'

File...
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: '<frozen importlib._bootstrap>'

In my specific case I have misspelled the name of the app in settings.py/INSTALLED_APPS, that's why the ModuleNotFoundError.

Django was looking for <app_name>.apps.<app_name>Config (for instance: blog.apps.BlogConfig), but I had a typo (like this one: blogg.apps.BlogConfig) and Django raised an error.

Here is a link to my answer in Stackoverflow.

hind-hb commented 3 years ago

[Version 6.2.9200] (c) 2012 Microsoft Corporation. All rights reserved.

(myvenv) C:\Users\hind\Desktop\department>python manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Users\hind\anaconda3\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\Users\hind\anaconda3\lib\threading.py", line 870, in run self._target(*self._args, self._kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(*args, *kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 110, in inner_run autoreload.raise_last_exception() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 76, in raise_last_exception raise _exception[1] File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management__init__.py", line 357, in execute autoreload.check_errors(django.setup)() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(args, kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django__init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\apps\registry.py", line 91, in populate app_config = AppConfig.create(entry) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\apps\config.py", line 90, in create module = import_module(entry) File "C:\Users\hind\anaconda3\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module named 'widget_tweaks' Traceback (most recent call last): File "manage.py", line 21, in main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\init__.py", line 401, in execute_from_command_line utility.execute() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\init__.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\base.py", line 330, in run_from_argv self.execute(*args, cmd_options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 61, in execute super().execute(*args, *options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\base.py", line 371, in execute output = self.handle(args, options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 96, in handle self.run(options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 103, in run autoreload.run_with_reloader(self.inner_run, options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 618, in run_with_reloader start_django(reloader, main_func, *args, **kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 603, in start_django reloader.run(django_main_thread) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 318, in run self.run_loop() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 324, in run_loop next(ticker) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 364, in tick for filepath, mtime in self.snapshot_files(): File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 380, in snapshot_files for file in self.watched_files(): File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 278, in watched_files yield from iter_all_python_module_files() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 105, in iter_all_python_module_files return iter_modules_and_files(modules, frozenset(_error_files)) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 141, in iter_modules_and_files resolved_path = path.resolve(strict=True).absolute() File "C:\Users\hind\anaconda3\lib\pathlib.py", line 1177, in resolve s = self._flavour.resolve(self, strict=strict) File "C:\Users\hind\anaconda3\lib\pathlib.py", line 200, in resolve return self._ext_to_normal(_getfinalpathname(s)) OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: ''

(myvenv) C:\Users\hind\Desktop\department>python manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Users\hind\anaconda3\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\Users\hind\anaconda3\lib\threading.py", line 870, in run self._target(*self._args, self._kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(*args, *kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 110, in inner_run autoreload.raise_last_exception() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 76, in raise_last_exception raise _exception[1] File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management__init__.py", line 357, in execute autoreload.check_errors(django.setup)() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(args, kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django__init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\apps\registry.py", line 91, in populate app_config = AppConfig.create(entry) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\apps\config.py", line 90, in create module = import_module(entry) File "C:\Users\hind\anaconda3\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module named 'widget_tweaks' Traceback (most recent call last): File "manage.py", line 21, in main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\init__.py", line 401, in execute_from_command_line utility.execute() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\init__.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\base.py", line 330, in run_from_argv self.execute(*args, cmd_options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 61, in execute super().execute(*args, *options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\base.py", line 371, in execute output = self.handle(args, options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 96, in handle self.run(options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 103, in run autoreload.run_with_reloader(self.inner_run, options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 618, in run_with_reloader start_django(reloader, main_func, *args, **kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 603, in start_django reloader.run(django_main_thread) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 318, in run self.run_loop() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 324, in run_loop next(ticker) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 364, in tick for filepath, mtime in self.snapshot_files(): File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 380, in snapshot_files for file in self.watched_files(): File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 278, in watched_files yield from iter_all_python_module_files() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 105, in iter_all_python_module_files return iter_modules_and_files(modules, frozenset(_error_files)) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 141, in iter_modules_and_files resolved_path = path.resolve(strict=True).absolute() File "C:\Users\hind\anaconda3\lib\pathlib.py", line 1177, in resolve s = self._flavour.resolve(self, strict=strict) File "C:\Users\hind\anaconda3\lib\pathlib.py", line 200, in resolve return self._ext_to_normal(_getfinalpathname(s)) OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: ''

(myvenv) C:\Users\hind\Desktop\department>python manage.py migrate Traceback (most recent call last): File "manage.py", line 21, in main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management__init.py", line 401, in execute_from_command_line utility.execute() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management__init.py", line 377, in execute django.setup() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\apps\registry.py", line 91, in populate app_config = AppConfig.create(entry) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\apps\config.py", line 90, in create module = import_module(entry) File "C:\Users\hind\anaconda3\lib\importlib\init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module named 'widget_tweaks'

(myvenv) C:\Users\hind\Desktop\department>python manage.py makemigrations Traceback (most recent call last): File "manage.py", line 21, in main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management__init.py", line 401, in execute_from_command_line utility.execute() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management__init.py", line 377, in execute django.setup() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\init__.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\apps\registry.py", line 91, in populate app_config = AppConfig.create(entry) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\apps\config.py", line 90, in create module = import_module(entry) File "C:\Users\hind\anaconda3\lib\importlib\init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module named 'widget_tweaks'

(myvenv) C:\Users\hind\Desktop\department>python manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Users\hind\anaconda3\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\Users\hind\anaconda3\lib\threading.py", line 870, in run self._target(*self._args, self._kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(*args, *kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 110, in inner_run autoreload.raise_last_exception() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 76, in raise_last_exception raise _exception[1] File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management__init__.py", line 357, in execute autoreload.check_errors(django.setup)() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(args, kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django__init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\apps\registry.py", line 91, in populate app_config = AppConfig.create(entry) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\apps\config.py", line 90, in create module = import_module(entry) File "C:\Users\hind\anaconda3\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module named 'widget_tweaks' Traceback (most recent call last): File "manage.py", line 21, in main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\init__.py", line 401, in execute_from_command_line utility.execute() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\init__.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\base.py", line 330, in run_from_argv self.execute(*args, cmd_options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 61, in execute super().execute(*args, *options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\base.py", line 371, in execute output = self.handle(args, options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 96, in handle self.run(options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 103, in run autoreload.run_with_reloader(self.inner_run, options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 618, in run_with_reloader start_django(reloader, main_func, *args, **kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 603, in start_django reloader.run(django_main_thread) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 318, in run self.run_loop() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 324, in run_loop next(ticker) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 364, in tick for filepath, mtime in self.snapshot_files(): File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 380, in snapshot_files for file in self.watched_files(): File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 278, in watched_files yield from iter_all_python_module_files() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 105, in iter_all_python_module_files return iter_modules_and_files(modules, frozenset(_error_files)) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 141, in iter_modules_and_files resolved_path = path.resolve(strict=True).absolute() File "C:\Users\hind\anaconda3\lib\pathlib.py", line 1177, in resolve s = self._flavour.resolve(self, strict=strict) File "C:\Users\hind\anaconda3\lib\pathlib.py", line 200, in resolve return self._ext_to_normal(_getfinalpathname(s)) OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: ''

(myvenv) C:\Users\hind\Desktop\department>cls

(myvenv) C:\Users\hind\Desktop\department>python manage.py runserver Watching for file changes with StatReloader Exception in thread django-main-thread: Traceback (most recent call last): File "C:\Users\hind\anaconda3\lib\threading.py", line 932, in _bootstrap_inner self.run() File "C:\Users\hind\anaconda3\lib\threading.py", line 870, in run self._target(*self._args, self._kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(*args, *kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 110, in inner_run autoreload.raise_last_exception() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 76, in raise_last_exception raise _exception[1] File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management__init__.py", line 357, in execute autoreload.check_errors(django.setup)() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 53, in wrapper fn(args, kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django__init.py", line 24, in setup apps.populate(settings.INSTALLED_APPS) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\apps\registry.py", line 91, in populate app_config = AppConfig.create(entry) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\apps\config.py", line 90, in create module = import_module(entry) File "C:\Users\hind\anaconda3\lib\importlib__init.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1014, in _gcd_import File "", line 991, in _find_and_load File "", line 973, in _find_and_load_unlocked ModuleNotFoundError: No module named 'widget_tweaks' Traceback (most recent call last): File "manage.py", line 21, in main() File "manage.py", line 17, in main execute_from_command_line(sys.argv) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\init__.py", line 401, in execute_from_command_line utility.execute() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\init__.py", line 395, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\base.py", line 330, in run_from_argv self.execute(*args, cmd_options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 61, in execute super().execute(*args, *options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\base.py", line 371, in execute output = self.handle(args, options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 96, in handle self.run(options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\core\management\commands\runserver.py", line 103, in run autoreload.run_with_reloader(self.inner_run, options) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 618, in run_with_reloader start_django(reloader, main_func, *args, **kwargs) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 603, in start_django reloader.run(django_main_thread) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 318, in run self.run_loop() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 324, in run_loop next(ticker) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 364, in tick for filepath, mtime in self.snapshot_files(): File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 380, in snapshot_files for file in self.watched_files(): File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 278, in watched_files yield from iter_all_python_module_files() File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 105, in iter_all_python_module_files return iter_modules_and_files(modules, frozenset(_error_files)) File "C:\Users\hind\Desktop\department\myvenv\lib\site-packages\django\utils\autoreload.py", line 141, in iter_modules_and_files resolved_path = path.resolve(strict=True).absolute() File "C:\Users\hind\anaconda3\lib\pathlib.py", line 1177, in resolve s = self._flavour.resolve(self, strict=strict) File "C:\Users\hind\anaconda3\lib\pathlib.py", line 200, in resolve return self._ext_to_normal(_getfinalpathname(s)) OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: ''

plz solve error

anukhatra commented 3 years ago

In my App named loginaccounts I named the folder url.py instead of urls.py Where as in settings.py I wrote path('', include('loginaccounts.urls')) So the name you write in settting.py is appname.urls this urls is basically the folder name you mention in app which is urls.py. They should match.

NithyaJanakiraman commented 3 years ago

Traceback (most recent call last): File "f:/My First Project/lambogini/lambogini/urls.py", line 21, in path(' ',include('car.urls')), File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\site-packages\django\urls\conf.py", line 34, in include urlconf_module = import_module(urlconf_module) File "C:\Users\Admin\AppData\Local\Programs\Python\Python37\lib\importlib__init__.py", line 127, in import_module return _bootstrap._gcd_import(name[level:], package, level) File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 953, in _find_and_load_unlocked File "", line 219, in _call_with_frames_removed File "", line 1006, in _gcd_import File "", line 983, in _find_and_load File "", line 965, in _find_and_load_unlocked ModuleNotFoundError: No module named 'car'

NithyaJanakiraman commented 3 years ago

i am getting this error

FidelCoder commented 2 years ago

hello good people How do I handle the below exception:

ModuleNotFoundError at /accounts/signup/

No module named 'users.forms'