{"action":"opened","issue":{"url":"https://api.github.com/repos/alphagov/stagecraft/issues/467","repository_url":"https://api.github.com/repos/alphagov/stagecraft","labels_url":"https://api.github.com/repos/alphagov/stagecraft/issues/467/labels{/name}","comments_url":"https://api.github.com/repos/alphagov/stagecraft/issues/467/comments","events_url":"https://api.github.com/repos/alphagov/stagecraft/issues/467/events","html_url":"https://github.com/alphagov/stagecraft/issues/467","id":176375268,"number":467,"title":"cffi/cryptography exception when attempting to run database migrations","user":{"login":"rubenarakelyan","id":444232,"avatar_url":"https://avatars.githubusercontent.com/u/444232?v=3","gravatar_id":"","url":"https://api.github.com/users/rubenarakelyan","html_url":"https://github.com/rubenarakelyan","followers_url":"https://api.github.com/users/rubenarakelyan/followers","following_url":"https://api.github.com/users/rubenarakelyan/following{/other_user}","gists_url":"https://api.github.com/users/rubenarakelyan/gists{/gist_id}","starred_url":"https://api.github.com/users/rubenarakelyan/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/rubenarakelyan/subscriptions","organizations_url":"https://api.github.com/users/rubenarakelyan/orgs","repos_url":"https://api.github.com/users/rubenarakelyan/repos","events_url":"https://api.github.com/users/rubenarakelyan/events{/privacy}","received_events_url":"https://api.github.com/users/rubenarakelyan/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2016-09-12T13:28:17Z","updated_at":"2016-09-12T13:28:17Z","closed_at":null,"body":"When running `python manage.py migrate`, the following exception happens:\r\n\r\n```\r\nTraceback (most recent call last):\r\n  File \"manage.py\", line 10, in <module>\r\n    execute_from_command_line(sys.argv)\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/core/management/__init__.py\", line 338, in execute_from_command_line\r\n    utility.execute()\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/core/management/__init__.py\", line 312, in execute\r\n    django.setup()\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/__init__.py\", line 18, in setup\r\n    apps.populate(settings.INSTALLED_APPS)\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/apps/registry.py\", line 108, in populate\r\n    app_config.import_models(all_models)\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/django/apps/config.py\", line 198, in import_models\r\n    self.models_module = import_module(models_module_name)\r\n  File \"/opt/python/2.7.9/lib/python2.7/importlib/__init__.py\", line 37, in import_module\r\n    __import__(name)\r\n  File \"/home/travis/build/alphagov/stagecraft/stagecraft/apps/collectors/models.py\", line 7, in <module>\r\n    from django_field_cryptography import fields as encrypted_fields\r\n  File \"/home/travis/virtualenv/python2.7.9/src/django-field-cryptography/django_field_cryptography/fields.py\", line 9, in <module>\r\n    fernet = Fernet(settings.FERNET_KEY)\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cryptography/fernet.py\", line 32, in __init__\r\n    backend = default_backend()\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cryptography/hazmat/backends/__init__.py\", line 40, in default_backend\r\n    _default_backend = MultiBackend(_available_backends())\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cryptography/hazmat/backends/__init__.py\", line 27, in _available_backends\r\n    \"cryptography.backends\"\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/pkg_resources/__init__.py\", line 2316, in resolve\r\n    module = __import__(self.module_name, fromlist=['__name__'], level=0)\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cryptography/hazmat/backends/openssl/__init__.py\", line 7, in <module>\r\n    from cryptography.hazmat.backends.openssl.backend import backend\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py\", line 1287, in <module>\r\n    backend = Backend()\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cryptography/hazmat/backends/openssl/backend.py\", line 77, in __init__\r\n    self._binding = Binding()\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py\", line 114, in __init__\r\n    self._ensure_ffi_initialized()\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cryptography/hazmat/bindings/openssl/binding.py\", line 126, in _ensure_ffi_initialized\r\n    cls._modules,\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cryptography/hazmat/bindings/utils.py\", line 31, in load_library_for_binding\r\n    lib = ffi.verifier.load_library()\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cffi/verifier.py\", line 114, in load_library\r\n    return self._load_library()\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cffi/verifier.py\", line 225, in _load_library\r\n    return self._vengine.load_library()\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cffi/vengine_cpy.py\", line 174, in load_library\r\n    lst = list(map(self.ffi._get_cached_btype, lst))\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cffi/api.py\", line 409, in _get_cached_btype\r\n    BType = type.get_cached_btype(self, finishlist)\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cffi/model.py\", line 61, in get_cached_btype\r\n    BType = self.build_backend_type(ffi, finishlist)\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cffi/model.py\", line 507, in build_backend_type\r\n    base_btype = self.build_baseinttype(ffi, finishlist)\r\n  File \"/home/travis/virtualenv/python2.7.9/lib/python2.7/site-packages/cffi/model.py\", line 525, in build_baseinttype\r\n    % self._get_c_name())\r\ncffi.api.CDefError: 'point_conversion_form_t' has no values explicitly defined: refusing to guess which integer type it is meant to be (unsigned/signed, int/long)\r\n```\r\n\r\nThis is due to the version of the `cryptography` package (locked to 0.9.3 by the requirements file) not being compatible with versions of the `cffi` package greater than ~1.5.0 (installed as a dependency of another package).\r\n\r\nThis should be resolvable by upgrading the required version of the `cryptography` package."}}
{"actor":{"display_login":"rubenarakelyan"}}