{"action":"created","issue":{"url":"https://api.github.com/repos/peeringdb/django-peeringdb/issues/17","repository_url":"https://api.github.com/repos/peeringdb/django-peeringdb","labels_url":"https://api.github.com/repos/peeringdb/django-peeringdb/issues/17/labels{/name}","comments_url":"https://api.github.com/repos/peeringdb/django-peeringdb/issues/17/comments","events_url":"https://api.github.com/repos/peeringdb/django-peeringdb/issues/17/events","html_url":"https://github.com/peeringdb/django-peeringdb/issues/17","id":268298496,"number":17,"title":"pdb_sync fails with AttributeError (NoneType)","user":{"login":"paravoid","id":1330796,"avatar_url":"https://avatars3.githubusercontent.com/u/1330796?v=4","gravatar_id":"","url":"https://api.github.com/users/paravoid","html_url":"https://github.com/paravoid","followers_url":"https://api.github.com/users/paravoid/followers","following_url":"https://api.github.com/users/paravoid/following{/other_user}","gists_url":"https://api.github.com/users/paravoid/gists{/gist_id}","starred_url":"https://api.github.com/users/paravoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paravoid/subscriptions","organizations_url":"https://api.github.com/users/paravoid/orgs","repos_url":"https://api.github.com/users/paravoid/repos","events_url":"https://api.github.com/users/paravoid/events{/privacy}","received_events_url":"https://api.github.com/users/paravoid/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":5,"created_at":"2017-10-25T07:49:18Z","updated_at":"2017-10-25T10:55:38Z","closed_at":null,"author_association":"NONE","body":"```\r\norg last update 0 11326 changed\r\ndata to be processed 11326\r\nfac last update 0 2586 changed\r\ndata to be processed 2586\r\nnet last update 0 10964 changed\r\ndata to be processed 10964\r\nix last update 0 624 changed\r\ndata to be processed 624\r\nixfac last update 0 1243 changed\r\ndata to be processed 1243\r\nixlan last update 0 622 changed\r\ndata to be processed 622\r\nixpfx last update 0 983 changed\r\ndata to be processed 983\r\npoc last update 0 16110 changed\r\ndata to be processed 16110\r\nnetfac last update 0 19418 changed\r\ndata to be processed 19418\r\nnetixlan last update 0 21342 changed\r\ndata to be processed 21342\r\nTraceback (most recent call last):\r\n  File \"./manage.py\", line 22, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/home/paravoid/venv/peeringdb/lib/python3.5/site-packages/django/core/management/__init__.py\", line 364, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/home/paravoid/venv/peeringdb/lib/python3.5/site-packages/django/core/management/__init__.py\", line 356, in execute\r\n    self.fetch_command(subcommand).run_from_argv(self.argv)\r\n  File \"/home/paravoid/venv/peeringdb/lib/python3.5/site-packages/django/core/management/base.py\", line 283, in run_from_argv\r\n    self.execute(*args, **cmd_options)\r\n  File \"/home/paravoid/venv/peeringdb/lib/python3.5/site-packages/django/core/management/base.py\", line 330, in execute\r\n    output = self.handle(*args, **options)\r\n  File \"/home/paravoid/venv/peeringdb/lib/python3.5/site-packages/django_peeringdb/management/commands/pdb_sync.py\", line 89, in handle\r\n    self.sync(tables, pk, limit=limit)\r\n  File \"/home/paravoid/venv/peeringdb/lib/python3.5/site-packages/django_peeringdb/management/commands/pdb_sync.py\", line 96, in sync\r\n    self.update_db(cls, self.get_objs(cls, pk=pk, **kwargs))\r\n  File \"/home/paravoid/venv/peeringdb/lib/python3.5/site-packages/django_peeringdb/management/commands/pdb_sync.py\", line 175, in update_db\r\n    self._sync(cls, row)\r\n  File \"/home/paravoid/venv/peeringdb/lib/python3.5/site-packages/django_peeringdb/management/commands/pdb_sync.py\", line 144, in _sync\r\n    sync.sync_obj(cls, row)\r\n  File \"/home/paravoid/venv/peeringdb/lib/python3.5/site-packages/django_peeringdb/sync.py\", line 52, in sync_obj\r\n    setattr(obj, field.name, value)\r\n  File \"/home/paravoid/venv/peeringdb/lib/python3.5/site-packages/django/db/models/fields/related_descriptors.py\", line 437, in __set__\r\n    setattr(rel_obj, self.related.field.name, None)\r\nAttributeError: 'NoneType' object has no attribute 'netixlan'\r\n```\r\n\r\nI just reproduced this in a clean Python3 environment with just `pip install django django-peeringdb` ran in it. Full environment is:\r\n```\r\ncertifi==2017.7.27.1\r\nchardet==3.0.4\r\nDjango==1.11.6\r\ndjango-countries==5.0\r\ndjango-handleref==0.3.0\r\ndjango-inet==0.3.2\r\ndjango-peeringdb==0.7.0\r\nidna==2.6\r\nipaddress==1.0.18\r\npkg-resources==0.0.0\r\npytz==2017.2\r\nrequests==2.18.4\r\nsix==1.11.0\r\ntwentyc.rpc==0.4.0\r\nurllib3==1.22\r\n```\r\n"},"comment":{"url":"https://api.github.com/repos/peeringdb/django-peeringdb/issues/comments/339292234","html_url":"https://github.com/peeringdb/django-peeringdb/issues/17#issuecomment-339292234","issue_url":"https://api.github.com/repos/peeringdb/django-peeringdb/issues/17","id":339292234,"user":{"login":"paravoid","id":1330796,"avatar_url":"https://avatars3.githubusercontent.com/u/1330796?v=4","gravatar_id":"","url":"https://api.github.com/users/paravoid","html_url":"https://github.com/paravoid","followers_url":"https://api.github.com/users/paravoid/followers","following_url":"https://api.github.com/users/paravoid/following{/other_user}","gists_url":"https://api.github.com/users/paravoid/gists{/gist_id}","starred_url":"https://api.github.com/users/paravoid/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/paravoid/subscriptions","organizations_url":"https://api.github.com/users/paravoid/orgs","repos_url":"https://api.github.com/users/paravoid/repos","events_url":"https://api.github.com/users/paravoid/events{/privacy}","received_events_url":"https://api.github.com/users/paravoid/received_events","type":"User","site_admin":false},"created_at":"2017-10-25T10:55:38Z","updated_at":"2017-10-25T10:55:38Z","author_association":"NONE","body":"New virtualenv set up with:\r\n```\r\npython3 -m venv foo\r\n. foo/bin/activate\r\npip install django django-peeringdb\r\n```\r\n\r\nThen in the checkout of my project (https://github.com/paravoid/peerassist), with a settings.py with an sqlite3 database, `PEERINGDB_SYNC_STRIP_TZ = True` and without `PEERINGDB_ABSTRACT_ONLY` defined, I ran:\r\n```\r\npython3 ./manage.py migrate\r\npython3 ./manage.py migrate --run-syncdb\r\npython3 ./manage.py pdb_sync\r\n```\r\n\r\nI already reproduced it three times but I'll try re-running it shortly, just in case it was transient. Are you sure you're using Python3? `manage.py` has a `/usr/bin/env python` shebang, which in most distributions points to Python 2."}}
{"actor":{"display_login":"paravoid"}}