You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Hi, i'm giving django-minio-storage a try and got an exception when storage-check is executed. I'm running Python 3.4.5 and Django 1.10.6.
Traceback (most recent call last):
File "/Users/daniel/Workspace/my_project/lib/python3.4/site-packages/watchman/decorators.py", line 17, in wrapped
response = func(*args, **kwargs)
File "/Users/daniel/Workspace/my_project/lib/python3.4/site-packages/watchman/checks.py", line 63, in _check_storage
path = default_storage.save(filename, ContentFile(content))
File "/Users/daniel/Workspace/my_project/lib/python3.4/site-packages/django/core/files/storage.py", line 54, in save
return self._save(name, content)
File "/Users/daniel/Workspace/my_project/lib/python3.4/site-packages/minio_storage/storage.py", line 77, in _save
content_type)
File "/Users/daniel/Workspace/my_project/lib/python3.4/site-packages/minio/api.py", line 894, in put_object
current_data, metadata=metadata)
File "/Users/daniel/Workspace/my_project/lib/python3.4/site-packages/minio/api.py", line 1557, in _do_put_object
raise ValueError('Input data must be bytes type')
ValueError: Input data must be bytes type
I was able to fix it by using a byte instead of str writing to the dummy file. This should basically work on Python 2.7 - i'd file a PR later.
The text was updated successfully, but these errors were encountered:
@saily Thanks for the report - I'm not too familiar w/ Python 3 yet (we're starting to begin the migration though). Happy to get a fix in if you can open a PR though. :)
Hi, i'm giving
django-minio-storage
a try and got an exception when storage-check is executed. I'm running Python 3.4.5 and Django 1.10.6.I was able to fix it by using a
byte
instead ofstr
writing to the dummy file. This should basically work on Python 2.7 - i'd file a PR later.The text was updated successfully, but these errors were encountered: