I use the django repositories that I used in the past to work with AWS S3. But with Microsoft Azure, I run into errors that do not return any results in google.
I am developing using python 3 and Django 1.8.4. I am using django-storage and django-storageages-redux to support python 3.
When calling ./manage.py collectstatic and type yes I get two (!) Errors:
Traceback (most recent call last): File "/Users/mac/.virtualenvs/bratwurst/lib/python3.4/site-packages/storages/backends/azure_storage.py", line 44, in exists self.connection.get_blob_properties( File "/Users/mac/.virtualenvs/bratwurst/lib/python3.4/site-packages/storages/backends/azure_storage.py", line 34, in connection self._connection = azure.storage.BlobService( AttributeError: 'module' object has no attribute 'BlobService' During handling of the above exception, another exception occurred: Traceback (most recent call last): File "./manage.py", line 10, in <module> execute_from_command_line(sys.argv) File "/Users/mac/.virtualenvs/bratwurst/lib/python3.4/site-packages/django/core/management/__init__.py", line 338, in execute_from_command_line utility.execute() File "/Users/mac/.virtualenvs/bratwurst/lib/python3.4/site-packages/django/core/management/__init__.py", line 330, in execute self.fetch_command(subcommand).run_from_argv(self.argv) File "/Users/mac/.virtualenvs/bratwurst/lib/python3.4/site-packages/django/core/management/base.py", line 393, in run_from_argv self.execute(*args, **cmd_options) File "/Users/mac/.virtualenvs/bratwurst/lib/python3.4/site-packages/django/core/management/base.py", line 444, in execute output = self.handle(*args, **options) File "/Users/mac/.virtualenvs/bratwurst/lib/python3.4/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 168, in handle collected = self.collect() File "/Users/mac/.virtualenvs/bratwurst/lib/python3.4/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 107, in collect handler(path, prefixed_path, storage) File "/Users/mac/.virtualenvs/bratwurst/lib/python3.4/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 305, in copy_file if not self.delete_file(path, prefixed_path, source_storage): File "/Users/mac/.virtualenvs/bratwurst/lib/python3.4/site-packages/django/contrib/staticfiles/management/commands/collectstatic.py", line 218, in delete_file if self.storage.exists(prefixed_path): File "/Users/mac/.virtualenvs/bratwurst/lib/python3.4/site-packages/storages/backends/azure_storage.py", line 46, in exists except azure.WindowsAzureMissingResourceError: AttributeError: 'module' object has no attribute 'WindowsAzureMissingResourceError'
I followed the meager instructions for using django repositories with azure here .
Any idea what might cause this error? Has anyone successfully deployed django 1.8 application with azure as storage and static files?
edit: I hacked a little django-storage module: Using
import azure.storage.blob self._connection = azure.storage.blob.blobservice.BlobService(
instead
self._connection = azure.storage.BlobService(
But now I get various errors that make me believe that this problem actually goes deeper.