Haven't seen this one before. How exactly did you install Azure Storage?
And which version?

On Wed, 7 Nov 2018, 04:29 Lawrence Goh <[email protected] wrote:

> Hi all,  would need some help on this issue I am facing. It's weird and
> odd.  I have the needed azure settings in settings.py, but I got this
> error.
>
> DEFAULT_FILE_STORAGE = 'storages.backends.azure_storage.AzureStorage'
> AZURE_ACCOUNT_NAME = <account_name>
> AZURE_ACCOUNT_KEY = <account_key>
> AZURE_CONTAINER = <container_name>
> MEDIA_ROOT = <blob url>
>
> I tried running purely "from azure.storage.blob import BlobPermissions" in
> python, no issues.  Any thoughts?  Thanks.
>
> arches    | Internal Server Error: /tile
> arches    | Traceback (most recent call last):
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/core/handlers/exception.py",
> line 41, in inner
> arches    |     response = get_response(request)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/core/handlers/base.py",
> line 187, in _get_response
> arches    |     response = self.process_exception_by_middleware(e, request)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/core/handlers/base.py",
> line 185, in _get_response
> arches    |     response = wrapped_callback(request, *callback_args,
> **callback_kwargs)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/views/generic/base.py",
> line 68, in view
> arches    |     return self.dispatch(request, *args, **kwargs)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/utils/decorators.py",
> line 67, in _wrapper
> arches    |     return bound_func(*args, **kwargs)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/contrib/auth/decorators.py",
> line 23, in _wrapped_view
> arches    |     return view_func(request, *args, **kwargs)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/utils/decorators.py",
> line 63, in bound_func
> arches    |     return func.__get__(self, type(self))(*args2, **kwargs2)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/views/generic/base.py",
> line 88, in dispatch
> arches    |     return handler(request, *args, **kwargs)
> arches    |   File "/web_root/arches/arches/app/views/tile.py", line 88,
> in post
> arches    |     tile.save(request=request)
> arches    |   File "/web_root/arches/arches/app/models/tile.py", line 228,
> in save
> arches    |     self.check_for_missing_nodes(request)
> arches    |   File "/web_root/arches/arches/app/models/tile.py", line 197,
> in check_for_missing_nodes
> arches    |     datatype.handle_request(self, request, node)
> arches    |   File "/web_root/arches/arches/app/datatypes/datatypes.py",
> line 942, in handle_request
> arches    |     file_model.save()
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/db/models/base.py",
> line 808, in save
> arches    |     force_update=force_update, update_fields=update_fields)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/db/models/base.py",
> line 838, in save_base
> arches    |     updated = self._save_table(raw, cls, force_insert,
> force_update, using, update_fields)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/db/models/base.py",
> line 902, in _save_table
> arches    |     for f in non_pks]
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/db/models/fields/files.py",
> line 296, in pre_save
> arches    |     file.save(file.name, file.file, save=False)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/db/models/fields/files.py",
> line 93, in save
> arches    |     name = self.field.generate_filename(self.instance, name)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/db/models/fields/files.py",
> line 331, in generate_filename
> arches    |     return self.storage.generate_filename(filename)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/utils/functional.py",
> line 238, in inner
> arches    |     self._setup()
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/core/files/storage.py",
> line 472, in _setup
> arches    |     self._wrapped = get_storage_class()()
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/core/files/storage.py",
> line 467, in get_storage_class
> arches    |     return import_string(import_path or
> settings.DEFAULT_FILE_STORAGE)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/django/utils/module_loading.py",
> line 20, in import_string
> arches    |     module = import_module(module_path)
> arches    |   File "/usr/lib/python2.7/importlib/__init__.py", line 37, in
> import_module
> arches    |     __import__(name)
> arches    |   File
> "/web_root/ENV/local/lib/python2.7/site-packages/storages/backends/azure_storage.py",
> line 9, in <module>
> arches    |     from azure.storage.blob import BlobPermissions,
> ContentSettings
> arches    | ImportError: cannot import name BlobPermissions
>
> --
> -- To post, send email to [email protected]. To unsubscribe,
> send email to [email protected]. For more
> information, visit https://groups.google.com/d/forum/archesproject?hl=en
> ---
> You received this message because you are subscribed to the Google Groups
> "Arches Project" group.
> To unsubscribe from this group and stop receiving emails from it, send an
> email to [email protected].
> For more options, visit https://groups.google.com/d/optout.
>

-- 
-- To post, send email to [email protected]. To unsubscribe, send 
email to [email protected]. For more information, 
visit https://groups.google.com/d/forum/archesproject?hl=en
--- 
You received this message because you are subscribed to the Google Groups 
"Arches Project" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to