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

FAILING: PYTHONPATH=/usr/share/graphite/webapp django-admin syncdb --settings=graphite.settings #2468

Closed
gregorywolf opened this issue Jul 21, 2019 · 8 comments
Labels

Comments

@gregorywolf
Copy link

Hello - Sorry to be redundant cause I realize that there was a similar issue raised already (Pls help run syncdb error ImportError: No module named graphite.settings #1867). My issue seems to be similar but I still not get past it even though I have SCANDIR installed.

Here is my issue.

COMMAND:
sudo PYTHONPATH=/usr/share/graphite/webapp django-admin syncdb --settings=graphite.settings

Output:

Traceback (most recent call last): File "/bin/django-admin", line 10, in <module> sys.exit(execute_from_command_line()) File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line utility.execute() File "/usr/lib/python2.7/site-packages/django/core/management/__init__.py", line 312, in execute django.setup() File "/usr/lib/python2.7/site-packages/django/__init__.py", line 18, in setup apps.populate(settings.INSTALLED_APPS) File "/usr/lib/python2.7/site-packages/django/apps/registry.py", line 115, in populate app_config.ready() File "/usr/lib/python2.7/site-packages/django/contrib/admin/apps.py", line 22, in ready self.module.autodiscover() File "/usr/lib/python2.7/site-packages/django/contrib/admin/__init__.py", line 24, in autodiscover autodiscover_modules('admin', register_to=site) File "/usr/lib/python2.7/site-packages/django/utils/module_loading.py", line 74, in autodiscover_modules import_module('%s.%s' % (app_config.name, module_to_search)) File "/usr/lib64/python2.7/importlib/__init__.py", line 37, in import_module __import__(name) File "/usr/lib/python2.7/site-packages/tagging/admin.py", line 3, in <module> from tagging.forms import TagAdminForm File "/usr/lib/python2.7/site-packages/tagging/forms.py", line 11, in <module> class TagAdminForm(forms.ModelForm): File "/usr/lib/python2.7/site-packages/django/forms/models.py", line 274, in __new__ "needs updating." % name django.core.exceptions.ImproperlyConfigured: Creating a ModelForm without either the 'fields' attribute or the 'exclude' attribute is prohibited; form TagAdminForm needs updating.

I have also tried the following

sudo PYTHONPATH=/opt/graphite/webapp django-admin.py migrate --settings=graphite.settings --run-syncdb

Any help would be much appreciated.

@deniszh
Copy link
Member

deniszh commented Jul 21, 2019

Hi @gregorywolf
Please see #1219
Upgrade your django-tagging module to 0.3.4

@gregorywolf
Copy link
Author

Hell @deniszh - Thank you for the response!! I am a little confused about the version. I used

pip show django django-tagging scandir whipser carbon graphite-web

and got the following:

`Name: Django
Version: 1.11
Summary: A high-level Python Web framework that encourages rapid development and clean, pragmatic design.
Home-page: https://www.djangoproject.com/
Author: Django Software Foundation
Author-email: [email protected]
License: BSD
Location: /usr/lib/python2.7/site-packages
Requires: pytz
Required-by:

Name: django-tagging
Version: 0.4.6
Summary: Generic tagging application for Django
Home-page: https://github.com/Fantomas42/django-tagging
Author: Fantomas42
Author-email: [email protected]
License: BSD License
Location: /usr/lib/python2.7/site-packages
Requires:
Required-by:

Name: scandir
Version: 1.10.0
Summary: scandir, a better directory iterator and faster os.walk()
Home-page: https://github.com/benhoyt/scandir
Author: Ben Hoyt
Author-email: [email protected]
License: New BSD License
Location: /usr/lib64/python2.7/site-packages
Requires:
Required-by:

Name: carbon
Version: 0.9.16
Summary: Backend data caching and persistence daemon for Graphite
Home-page: http://graphite-project.github.com
Author: Chris Davis
Author-email: [email protected]
License: Apache Software License 2.0
Location: /usr/lib/python2.7/site-packages
Requires:
Required-by:

Name: graphite-web
Version: 0.9.16
Summary: Enterprise scalable realtime graphing
Home-page: http://graphite.readthedocs.org
Author: Chris Davis
Author-email: [email protected]
License: Apache Software License 2.0
Location: /usr/lib/python2.7/site-packages
Requires:
Required-by: `

As you can see I am running a more recent version of django-tagiing. Is the issue different or should I downgrade django-tagging?

Thank you so much for the help!!!!!

@piotr1212
Copy link
Member

Strange, could you please verify that the version really is 0.4.6 in /usr/lib/python2.7/site-packages/tagging/__init__.py?

@gregorywolf
Copy link
Author

Here are the results:
pwd /usr/lib/python2.7/site-packages/tagging

[root@graph-a tagging]# more __init__.py """ Django-tagging """ __version__ = '0.4.6' __license__ = 'BSD License' __author__ = 'Jonathan Buchanan' __author_email__ = '[email protected]' __maintainer__ = 'Fantomas42' __maintainer_email__ = '[email protected]' __url__ = 'https://github.com/Fantomas42/django-tagging' default_app_config = 'tagging.apps.TaggingConfig' [root@graph-a tagging]#

@piotr1212
Copy link
Member

ok, another check.

You set your Pythonpath to PYTHONPATH=/usr/share/graphite/webapp. But according to your pip output it is installed in /usr/lib/python2.7/site-packages.

Could it be possible that you have graphite-web installed twice? If you are running it from usr/share/graphite/webapp please check what that version is.

@gregorywolf
Copy link
Author

Hi - It is possible that I have installed graphite-web twice. In an effort to resolve my problems I have tried downloading packages again. Instead of trouble shooting further I am going to work on a new VM instance and try with a clean installation. I will circle back and report the result. Thank you. Be back soon.

@piotr1212
Copy link
Member

I would recommend you to install it in virtualenv, that makes a clean virtual environment and doesn't mix up with your systems Python packages.

@gregorywolf
Copy link
Author

I am going to close this issue and revisit at a later time

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

3 participants