Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Django 1.9 #11

Open
kurokochin opened this issue Jan 22, 2017 · 1 comment
Open

Django 1.9 #11

kurokochin opened this issue Jan 22, 2017 · 1 comment

Comments

@kurokochin
Copy link

kurokochin commented Jan 22, 2017

return query.get_compiler(using=using).execute_sql(return_id)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/fields/files.py", line 311, in pre_save
  File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1063, in execute_sql
    for sql, params in self.as_sql():
  File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/sql/compiler.py", line 1023, in as_sql
  File "/app/.heroku/python/lib/python2.7/site-packages/django/db/models/fields/files.py", line 93, in save
  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/files/storage.py", line 53, in save
    name = self.get_available_name(name, max_length=max_length)
  File "/app/.heroku/python/lib/python2.7/site-packages/django/core/files/storage.py", line 89, in get_available_name
    return field.pre_save(obj, add=True)
    while self.exists(name) or (max_length and len(name) > max_length):
  File "/app/cpcapung/storage.py", line 186, in exists
    file.save(file.name, file, save=False)
    self.name = self.storage.save(name, content, max_length=self.field.max_length)
  File "/app/cpcapung/storage.py", line 105, in _get_properties
    self._get_properties(name)
    response = self._perform_request(request)
    blob_name=name
    _storage_error_handler(ex)
  File "/app/.heroku/python/lib/python2.7/site-packages/azure/storage/blob/blobservice.py", line 718, in get_blob_properties
  File "/app/.heroku/python/lib/python2.7/site-packages/azure/storage/storageclient.py", line 178, in _perform_request
    raise AzureHttpError(message, http_error.status)
 File "/app/.heroku/python/lib/python2.7/site-packages/azure/storage/_serialization.py", line 25, in _storage_error_handler
    return _general_error_handler(http_error)
  File "/app/.heroku/python/lib/python2.7/site-packages/azure/storage/_common_error.py", line 82, in _general_error_handler
AzureHttpError: Bad Request

I got this error sometimes, about 50% when i try to upload my file from my server

@kevin-brown
Copy link
Contributor

Hi @kurokochin, thanks for contacting us about this issue.

The traceback does not appear to hit the Django Azure Storage library, despite the fact that it does hit Azure in the process of working with the storage. This can be confirmed by looking for azure_storage in the traceback, which is the Python package name. This might be because you are vendoring Django Azure Storage so you could make changes to it. In that case, there isn't a ton we can help with, since we don't have access to the vendored files, and any changes that were made may have been the cause of the issue.

If you are able to reproduce this issue when using the latest version of Django Azure Storage, it would be helpful if we could get a list of steps which need to be taken in order to consistently reproduce this error. Since we aren't using Heroku, it's impossible for us to reproduce any Heroku-specific issues, but we may be able to track down the cause.

Also, the traceback that you provided either appears to be incomplete or in the wrong order.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants