[PDB-tech] peeringdb python library - django error
Jeroen Valcke
jvalcke at opendns.com
Wed Mar 9 05:18:18 PST 2016
For anybody else with this problem. I've fixed this by upgrading django.
However I'm still having an issue sync'ing the db locally. For some reason
the sync process doesn't create the peeringdb tables in my database.
[ ~/.peeringdb] # peeringdb sync
...
django.db.utils.ProgrammingError: (1146, "Table
'peeringdb.peeringdb_organization' doesn't exist")
I only have these tables
mysql> use peeringdb
Reading table information for completion of table and column names
You can turn off this feature to get a quicker startup with -A
Database changed
mysql> show tables;
+----------------------------+
| Tables_in_peeringdb |
+----------------------------+
| auth_group |
| auth_group_permissions |
| auth_permission |
| auth_user |
| auth_user_groups |
| auth_user_user_permissions |
| django_admin_log |
| django_content_type |
| django_migrations |
| django_session |
+----------------------------+
10 rows in set (0.00 sec)
The sync process is supposed to create the required tables, right? I don't
recall creating these manually on my development machine.
Best,
-Jeroen-
On Mon, Mar 7, 2016 at 11:38 AM, Jeroen Valcke <jvalcke at opendns.com> wrote:
> Hi,
>
> I'm installing the peeringdb python library on another system, and ran
> into a django issue.
> Any ideas on how to fix this?
>
> # peeringdb sync
> Traceback (most recent call last):
> File "/usr/local/bin/peeringdb", line 9, in <module>
> load_entry_point('peeringdb==0.4.2', 'console_scripts', 'peeringdb')()
> File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 716,
> in __call__
> return self.main(*args, **kwargs)
> File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 696,
> in main
> rv = self.invoke(ctx)
> File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 1060,
> in invoke
> return _process_result(sub_ctx.command.invoke(sub_ctx))
> File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 889,
> in invoke
> return ctx.invoke(self.callback, **ctx.params)
> File "/usr/local/lib/python2.7/dist-packages/click/core.py", line 534,
> in invoke
> return callback(*args, **kwargs)
> File "/usr/local/lib/python2.7/dist-packages/peeringdb/cli.py", line
> 124, in sync
> db = LocalDB(cfg)
> File "/usr/local/lib/python2.7/dist-packages/peeringdb/localdb.py", line
> 90, in __init__
> django.setup()
> File "/usr/local/lib/python2.7/dist-packages/django/__init__.py", line
> 15, in setup
> from django.utils.log import configure_logging
> File "/usr/local/lib/python2.7/dist-packages/django/utils/log.py", line
> 16, in <module>
> from django.views.debug import ExceptionReporter,
> get_exception_reporter_filter
> File "/usr/local/lib/python2.7/dist-packages/django/views/debug.py",
> line 9, in <module>
> from django.core.urlresolvers import Resolver404, resolve
> File
> "/usr/local/lib/python2.7/dist-packages/django/core/urlresolvers.py", line
> 17, in <module>
> from django.http import Http404
> File "/usr/local/lib/python2.7/dist-packages/django/http/__init__.py",
> line 4, in <module>
> from django.http.response import (
> File "/usr/local/lib/python2.7/dist-packages/django/http/response.py",
> line 13, in <module>
> from django.core.serializers.json import DjangoJSONEncoder
> File
> "/usr/local/lib/python2.7/dist-packages/django/core/serializers/__init__.py",
> line 24, in <module>
> from django.core.serializers.base import SerializerDoesNotExist
> File
> "/usr/local/lib/python2.7/dist-packages/django/core/serializers/base.py",
> line 6, in <module>
> from django.db import models
> File
> "/usr/local/lib/python2.7/dist-packages/django/db/models/__init__.py", line
> 6, in <module>
> from django.db.models.query import Q, QuerySet, Prefetch # NOQA
> File "/usr/local/lib/python2.7/dist-packages/django/db/models/query.py",
> line 16, in <module>
> from django.db.models import sql
> File
> "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/__init__.py",
> line 2, in <module>
> from django.db.models.sql.subqueries import * # NOQA
> File
> "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/subqueries.py",
> line 9, in <module>
> from django.db.models.sql.query import Query
> File
> "/usr/local/lib/python2.7/dist-packages/django/db/models/sql/query.py",
> line 17, in <module>
> from django.db.models.aggregates import Count
> File
> "/usr/local/lib/python2.7/dist-packages/django/db/models/aggregates.py",
> line 5, in <module>
> from django.db.models.expressions import Func, Star
> File
> "/usr/local/lib/python2.7/dist-packages/django/db/models/expressions.py",
> line 7, in <module>
> from django.db.models import fields
> File
> "/usr/local/lib/python2.7/dist-packages/django/db/models/fields/__init__.py",
> line 19, in <module>
> from django import forms
> File "/usr/local/lib/python2.7/dist-packages/django/forms/__init__.py",
> line 6, in <module>
> from django.forms.fields import * # NOQA
> File "/usr/local/lib/python2.7/dist-packages/django/forms/fields.py",
> line 57, in <module>
> class Field(six.with_metaclass(RenameFieldMethods, object)):
> File "/usr/local/lib/python2.7/dist-packages/django/utils/six.py", line
> 778, in __new__
> return meta(name, bases, d)
> File
> "/usr/local/lib/python2.7/dist-packages/django/utils/deprecation.py", line
> 53, in __new__
> for base in inspect.getmro(new_class):
> AttributeError: 'module' object has no attribute 'getmro'
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.peeringdb.com/pipermail/pdb-tech/attachments/20160309/33b12a12/attachment.html>
More information about the Pdb-tech
mailing list