I have this new remote job, where I had to clone all the code from a repository, and I have to make an export of the database from MySQL hosted in RDS.
The first problem is that when I set up the configuration to start the app, it raise an error telling me this:
Run Configuration Error: Broken configuration due to unavailable plugin or invalid configuration data.
The other thing is that I already have the data dumped and set up in my local storage (the app works this way, is no longer using AWS Cloud) but when I try to do an python manage.py migrate , this error comes up...
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "C:\Users\Tony-App\Documents\App\venv\lib\site-packages\django\core\management\__init__.py", line 338, in execute_from_command_line
utility.execute()
File "C:\Users\Tony-App\Documents\App\venv\lib\site-packages\django\core\management\__init__.py", line 312, in execute
django.setup()
File "C:\Users\Tony-App\Documents\App\venv\lib\site-packages\django\__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\Tony-App\Documents\App\venv\lib\site-packages\django\apps\registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "C:\Users\Tony-App\Documents\App\venv\lib\site-packages\django\apps\config.py", line 86, in create
module = import_module(entry)
File "C:\Users\Tony-App\AppData\Local\Programs\Python\Python37-32\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1006, in _gcd_import
File "<frozen importlib._bootstrap>", line 983, in _find_and_load
File "<frozen importlib._bootstrap>", line 967, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 677, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 728, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "C:\Users\Tony-App\Documents\App\venv\lib\site-packages\liststyle\__init__.py", line 1, in <module>
from admin import ListStyleAdminMixin
ModuleNotFoundError: No module named 'admin'
First, django-liststyle is a dependency in your project, so make sure it has been installed.
py -m pip install django-liststyle
Second, make sure to add that package to INSTALLED_APPS:
INSTALLED_APPS = {
...
'liststyle',
...
'django.contrib.admin',
...
}
Third, I think the error you are getting is because of the way you are importing ListStyleAdminMixin. This should be the correct way to import it:
from liststyle.admin import ListStyleAdminMixin
Related
I'm trying to create migrations for my pet project.
However, I'm experiencing an Error that can't google an answer for:
it says:
`vincent#master-PC:/media/vincent/82944C77944C6FA9/Users/Ghost/Desktop/Python/PB/lesson 40/meeting_planner$ python3 manage.py makemigrations
Traceback (most recent call last):
File "/media/vincent/82944C77944C6FA9/Users/Ghost/Desktop/Python/PB/lesson 40/meeting_planner/manage.py", line 22, in <module>
main()
File "/media/vincent/82944C77944C6FA9/Users/Ghost/Desktop/Python/PB/lesson 40/meeting_planner/manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "/home/vincent/.local/share/virtualenvs/lesson_40-49hQCJIK/lib/python3.10/site-packages/django/core/management/__init__.py", line 446, in execute_from_command_line
utility.execute()
File "/home/vincent/.local/share/virtualenvs/lesson_40-49hQCJIK/lib/python3.10/site-packages/django/core/management/__init__.py", line 420, in execute
django.setup()
File "/home/vincent/.local/share/virtualenvs/lesson_40-49hQCJIK/lib/python3.10/site-packages/django/__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "/home/vincent/.local/share/virtualenvs/lesson_40-49hQCJIK/lib/python3.10/site-packages/django/apps/registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "/home/vincent/.local/share/virtualenvs/lesson_40-49hQCJIK/lib/python3.10/site-packages/django/apps/config.py", line 193, in create
import_module(entry)
File "/usr/lib/python3.10/importlib/__init__.py", line 126, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1050, in _gcd_import
File "<frozen importlib._bootstrap>", line 1027, in _find_and_load
File "<frozen importlib._bootstrap>", line 1004, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'django.contrib.cont enttypes'
P.S. I'm using SQLite database
I DID define my app in the settings correctly (checked it twice), tried to restart my VScode and restart pipenv too. However, it didn't work.
django.contrib.cont enttypes should be django.contrib.contenttypes
i'm running into a very weird error in django rest framework. I tried all the solutions proposed in stackoverflow but nothing.
the error:
Traceback (most recent call last):
File "C:\Users\User\Desktop\IVAN.ru\IVAN_backend\backend\manage.py", line 22, in <module>
main()
File "C:\Users\User\Desktop\IVAN.ru\IVAN_backend\backend\manage.py", line 18, in main
execute_from_command_line(sys.argv)
File "C:\Users\User\Desktop\IVAN.ru\IVAN_backend\lib\site-packages\django\core\management\__init__.py", line 419, in execute_from_command_line
utility.execute()
File "C:\Users\User\Desktop\IVAN.ru\IVAN_backend\lib\site-packages\django\core\management\__init__.py", line 395, in execute
django.setup()
File "C:\Users\User\Desktop\IVAN.ru\IVAN_backend\lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "C:\Users\User\Desktop\IVAN.ru\IVAN_backend\lib\site-packages\django\apps\registry.py", line 91, in populate
app_config = AppConfig.create(entry)
File "C:\Users\User\Desktop\IVAN.ru\IVAN_backend\lib\site-packages\django\apps\config.py", line 224, in create
import_module(entry)
File "C:\Python39\lib\importlib\__init__.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "<frozen importlib._bootstrap>", line 1030, in _gcd_import
File "<frozen importlib._bootstrap>", line 1007, in _find_and_load
File "<frozen importlib._bootstrap>", line 984, in _find_and_load_unlocked
ModuleNotFoundError: No module named 'imagekit'
please notice that i added 'imagekit' to installed apps , I uninstalled and reinstalled everything.
but nothing worked for me. I installed django-imagekit and uninstalled Imagekit.
i tried to replace 'imagekit' with 'Imagekit' .
Install django-imagekit:
pip install django-imagekit
Use ImageKit in settings.py file:
INSTALLED_APPS = [
"ImageKit"
...
]
Hi Am Attempting to install the latest version of Saleor Django based ecommerce CMS to a windows VM on AzUre. I followed the Saleor installation instruction steps based on the provided requirement.txt file and the Azure instructions to setup up a web app.
I have completed the install twice and each time when I attempt to run Saleor I receive this error below. I have scanned the Internet and found this link
Just wondering if :
any one can explain the statement "had a folder called graphql in my path" I have no idea what this statement means since I am only a beginner orogrammer. [Replacing the file with "graphql-core>=2.0.dev" makes no difference]
any one can give me some diagnostic steps that I could go through to help me find the reason for the error. Any help appreciated.
Traceback (most recent call last):
File "run_waitress_server.py", line 9, in <module>
application = get_wsgi_application()
File "D:\home\python364x64\Lib\site-packages\django\core\wsgi.py", line 12, in get_wsgi_application
django.setup(set_prefix=False)
File "D:\home\python364x64\Lib\site-packages\django\__init__.py", line 24, in setup
apps.populate(settings.INSTALLED_APPS)
File "D:\home\python364x64\Lib\site-packages\django\apps\registry.py", line 89, in populate
app_config = AppConfig.create(entry)
File "D:\home\python364x64\Lib\site-packages\django\apps\config.py", line 90, in create
module = import_module(entry)
File "E:\A\_work\79\b\source_packages\python.3.6.4\tools\Lib\importlib\__init__.py", line 126, in import_module
File "<frozen importlib._bootstrap>", line 994, in _gcd_import
File "<frozen importlib._bootstrap>", line 971, in _find_and_load
File "<frozen importlib._bootstrap>", line 955, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 665, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "D:\home\python364x64\Lib\site-packages\graphene_django\__init__.py", line 1, in <module>
from .types import (
File "D:\home\python364x64\Lib\site-packages\graphene_django\types.py", line 4, in <module>
from graphene import Field
File "D:\home\python364x64\Lib\site-packages\graphene\__init__.py", line 3, in <module>
from .types import (
File "D:\home\python364x64\Lib\site-packages\graphene\types\__init__.py", line 2, in <module>
from graphql import ResolveInfo
ImportError: cannot import name 'ResolveInfo'
I am getting the following error when trying to launch shell_plus after installing django_extensions. Here are the steps i followed
1-Installed django_extensions using
pip install django_extensions
2-Added django_extensions to installed apps
Then I get the following error
$ ./manage.py shell_plus
Traceback (most recent call last):
File "./manage.py", line 15, in <module>
execute_from_command_line(sys.argv)
File "/Users/admin/Development/project/virtual/lib/python3.5/site-packages/django/core/management/__init__.py", line 371, in execute_from_command_line
utility.execute()
File "/Users/admin/Development/project/virtual/lib/python3.5/site-packages/django/core/management/__init__.py", line 365, in execute
self.fetch_command(subcommand).run_from_argv(self.argv)
File "/Users/admin/Development/project/virtual/lib/python3.5/site-packages/django/core/management/__init__.py", line 216, in fetch_command
klass = load_command_class(app_name, subcommand)
File "/Users/admin/Development/project/virtual/lib/python3.5/site-packages/django/core/management/__init__.py", line 36, in load_command_class
module = import_module('%s.management.commands.%s' % (app_name, name))
File "/Library/Frameworks/Python.framework/Versions/3.5/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 673, in _load_unlocked
File "<frozen importlib._bootstrap_external>", line 662, in exec_module
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "/Users/admin/Development/project/virtual/lib/python3.5/site-packages/django_extensions/management/commands/shell_plus.py", line 14, in <module>
from django_extensions.management.shells import import_objects
File "/Users/admin/Development/project/virtual/lib/python3.5/site-packages/django_extensions/management/shells.py", line 5, in <module>
from typing import ( # NOQA
ImportError: cannot import name 'Type'
Any suggestions on what might be going wrong ?
Python 3.5 comes with its own version of typing module. What is most likely happening is that you have the other typing module specified in your requirements (the one that doesn't include Type class) and its getting picked up by django_extensions instead of the native Python one. Check your installed modules, or try running:
pip uninstall typing
I want use search library in django
So i decide to use django-watson(it tell me easy install, easy use)
I command
git clone https://github.com/etianen/django-watson.git
in my django projects
and insert watson in my settings.py. INSTALLED_APPS
when I command
python manage.py migrate
django can't find watson so I decide uninstall django-watson and reinstall
I command
rm -rf django-watson
and command migrate (check about when i was uninstall library migrate has no problem)
python manage.py migrate
suddenly it show me error for me
Traceback (most recent call last):
File "manage.py", line 10, in <module>
execute_from_command_line(sys.argv)
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/core/management/__init__.py", line 353, in execute_from_command_line
utility.execute()
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/core/management/__init__.py", line 327, in execute
django.setup()
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/__init__.py", line 18, in setup
apps.populate(settings.INSTALLED_APPS)
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/apps/registry.py", line 85, in populate
app_config = AppConfig.create(entry)
File "/Users/hanminsoo/.pyenv/versions/study_alone/lib/python3.5/site-packages/django/apps/config.py", line 116, in create
mod = import_module(mod_path)
File "/Users/hanminsoo/.pyenv/versions/3.5.1/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 944, in _find_and_load_unlocked
File "<frozen importlib._bootstrap>", line 222, in _call_with_frames_removed
File "<frozen importlib._bootstrap>", line 986, in _gcd_import
File "<frozen importlib._bootstrap>", line 969, in _find_and_load
File "<frozen importlib._bootstrap>", line 956, in _find_and_load_unlocked
ImportError: No module named 'django-watson'
I think it has installed in env but i can't find where is django-watson
I want remove django-watson clearly
please somebody help me
Make sure you have removed it from INSTALLED_APPS in settings.py and that you have removed all imports related to it inside your project.
As said, you have to remove django-watson from your installed apps. But that was the original mistake: to install watson, you have to add watson to your INSTALLED_APPS, not django-watson. This is well explained in the documentation:
Install django-watson using pip: pip install django-watson.
Add 'watson' to your INSTALLED_APPS setting.