[PDB Tech] Peeringdb sync problem

Stefan Pratter stefan at 20c.com
Fri May 22 06:37:15 PDT 2020


Python2.7 support was dropped with version 2.0

I believe officially supported versions are now 3.5, 3.6, 3.7 and 3.8

Is upgrading to python3 a possibility on your end?

Stefan


On 22/05/2020 16.32, Jan.Boogman at swisscom.com wrote:
> Hi Stefan
> 
> I had 1.1.0 after upgrading I get this error:
> 
> 
> pdb at pdb2:~$ pip freeze | grep django-peeringdb
> django-peeringdb==2.0.0
> pdb at pdb2:~$ peeringdb sync
> Traceback (most recent call last):
>    File "/usr/local/bin/peeringdb", line 11, in <module>
>      sys.exit(main())
>    File "/home/pdb/.local/lib/python2.7/site-packages/peeringdb/cli.py", 
> line 62, in main
>      return handler(config=cfg, **vars(options))
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/peeringdb/commands.py", 
> line 20, in _wrapped
>      r = func(*a, **k)
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/peeringdb/commands.py", 
> line 212, in handle
>      client = Client(config, **kwargs)
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/peeringdb/client.py", line 
> 44, in __init__
>      peeringdb.initialize_backend(orm_name, **orm_config)
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/peeringdb/__init__.py", 
> line 84, in initialize_backend
>      B = supportmod.load_backend(**kwargs)
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/django_peeringdb/client_adaptor/load.py", 
> line 38, in load_backend
>      configure(**settings)
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/django_peeringdb/client_adaptor/setup.py", 
> line 26, in configure
>      setup()
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/django/__init__.py", line 
> 27, in setup
>      apps.populate(settings.INSTALLED_APPS)
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/django/apps/registry.py", 
> line 108, in populate
>      app_config.import_models()
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/django/apps/config.py", 
> line 202, in import_models
>      self.models_module = import_module(models_module_name)
>    File "/usr/lib/python2.7/importlib/__init__.py", line 37, in 
> import_module
>      __import__(name)
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/django_peeringdb/models/__init__.py", 
> line 4, in <module>
>      from django_peeringdb.models.abstract import * # noqa
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/django_peeringdb/models/abstract.py", 
> line 36, in <module>
>      class AddressModel(models.Model):
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/django/db/models/base.py", 
> line 162, in __new__
>      new_class.add_to_class(obj_name, obj)
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/django/db/models/base.py", 
> line 325, in add_to_class
>      value.contribute_to_class(cls, name)
>    File 
> "/home/pdb/.local/lib/python2.7/site-packages/django_countries/fields.py", 
> line 300, in contribute_to_class
>      super().contribute_to_class(cls, name)
> TypeError: Error when calling the metaclass bases
>      super() takes at least 1 argument (0 given)
> pdb at pdb2:~$
> 
> Best regards
> Jan
> ------------------------------------------------------------------------
> *Von:* Pdb-tech <pdb-tech-bounces at lists.peeringdb.com> im Auftrag von 
> Stefan Pratter <stefan at 20c.com>
> *Gesendet:* Freitag, 22. Mai 2020 15:18
> *An:* pdb-tech at lists.peeringdb.com <pdb-tech at lists.peeringdb.com>
> *Betreff:* Re: [PDB Tech] Peeringdb sync problem
> Validation errors are often (not always) caused by the server's
> django-peeringdb version being ahead of your locally installed version.
> In other words the server treats something as valid, while the client
> doesn't.
> 
> What's the output of
> 
> `pip freeze | grep django-peeringdb`
> 
> and if its < 2.0
> 
> can you try updating to 2.0
> 
> `pip install django-peeringdb==2.0`
> 
> thanks,
> Stefan
> 
> On 22/05/2020 13.18, Jan.Boogman at swisscom.com wrote:
>> Hi Arnold,
>> 
>> indeed, seems to be the same issue
>> 
>> Cheers
>> Jan
>> 
>> 
>> ------------------------------------------------------------------------
>> *Von:* Arnold Nipper
>> *Gesendet:* Freitag, 22. Mai 2020 12:09
>> *Bis:* Boogman Jan, INI-ONE-WSN-EIS-SNS; pdb-tech at lists.peeringdb.com
>> *Betreff:* Re: [PDB Tech] Peeringdb sync problem
>> 
>> Hi Jan
>> 
>> On 22.05.2020 10:20, Jan.Boogman at swisscom.com wrote:
>> 
>>> every now and then I stumble over syncing problems like this, which seem
>>> to be caused by bad data in the db:
>>> 
>> 
>> looks like https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Fgithub.com%2Fpeeringdb%2Fpeeringdb-py%2Fissues%2F38&data=02%7C01%7CJan.Boogman%40swisscom.com%7Ca42cf182e3f2417f0f3108d7fe52b005%7C364e5b87c1c7420d9beec35d19b557a1%7C1%7C0%7C637257503400848462&sdata=qbz9tTDN7rNZuo87dNJ9MbFsRNhcTFK9lS%2FB7Ga2%2BzQ%3D&reserved=0 
> to me.
>> Could you please check?
>> 
>> 
>> Cheers
>> Arnold
>> -- 
>> Keep calm, keep distance, keep connected!
>> 
>> Arnold Nipper
>> email: arnold at nipper.de
>> mobile: +49 172 2650958
>> 
>> 
>> _______________________________________________
>> Pdb-tech mailing list
>> Pdb-tech at lists.peeringdb.com
>> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.peeringdb.com%2Fcgi-bin%2Fmailman%2Flistinfo%2Fpdb-tech&data=02%7C01%7CJan.Boogman%40swisscom.com%7Ca42cf182e3f2417f0f3108d7fe52b005%7C364e5b87c1c7420d9beec35d19b557a1%7C1%7C0%7C637257503400848462&sdata=gffl5%2Box96RrDqp78giQx5Xf6%2FZo7y4Y7T1Snf%2FS2zU%3D&reserved=0
>> 
> _______________________________________________
> Pdb-tech mailing list
> Pdb-tech at lists.peeringdb.com
> https://eur03.safelinks.protection.outlook.com/?url=https%3A%2F%2Flists.peeringdb.com%2Fcgi-bin%2Fmailman%2Flistinfo%2Fpdb-tech&data=02%7C01%7CJan.Boogman%40swisscom.com%7Ca42cf182e3f2417f0f3108d7fe52b005%7C364e5b87c1c7420d9beec35d19b557a1%7C1%7C0%7C637257503400848462&sdata=gffl5%2Box96RrDqp78giQx5Xf6%2FZo7y4Y7T1Snf%2FS2zU%3D&reserved=0


More information about the Pdb-tech mailing list