can you file an issue for that? Given that it has the word "unicode" I 
suspect this is python3 code being run on pythonLessThanThree

- Pomax

On Saturday, April 15, 2017 at 1:31:36 AM UTC-7, [email protected] wrote:
>
> "error":"Unicode-objects must be encoded before hashing",
>       "stacktrace":"Traceback (most recent call last):\n  File 
> \"/usr/local/lib/python3.5/site-packages/watchman/decorators.py\", line 17, 
> in wrapped\n    response = func(*args, **kwargs)\n  File 
> \"/usr/local/lib/python3.5/site-packages/watchman/checks.py\", line 63, in 
> _check_storage\n    path = default_storage.save(filename, 
> ContentFile(content))\n  File 
> \"/usr/local/lib/python3.5/site-packages/django/core/files/storage.py\", 
> line 54, in save\n    return self._save(name, content)\n  File 
> \"/usr/local/lib/python3.5/site-packages/storages/backends/s3boto3.py\", 
> line 452, in _save\n    self._save_content(obj, content, 
> parameters=parameters)\n  File 
> \"/usr/local/lib/python3.5/site-packages/storages/backends/s3boto3.py\", 
> line 467, in _save_content\n    obj.upload_fileobj(content, 
> ExtraArgs=put_parameters)\n  File 
> \"/usr/local/lib/python3.5/site-packages/boto3/s3/inject.py\", line 509, in 
> object_upload_fileobj\n    ExtraArgs=ExtraArgs, Callback=Callback, 
> Config=Config)\n  File 
> \"/usr/local/lib/python3.5/site-packages/boto3/s3/inject.py\", line 427, in 
> upload_fileobj\n    return future.result()\n  File 
> \"/usr/local/lib/python3.5/site-packages/s3transfer/futures.py\", line 73, 
> in result\n    return self._coordinator.result()\n  File 
> \"/usr/local/lib/python3.5/site-packages/s3transfer/futures.py\", line 233, 
> in result\n    raise self._exception\n  File 
> \"/usr/local/lib/python3.5/site-packages/s3transfer/tasks.py\", line 126, 
> in __call__\n    return self._execute_main(kwargs)\n  File 
> \"/usr/local/lib/python3.5/site-packages/s3transfer/tasks.py\", line 150, 
> in _execute_main\n    return_value = self._main(**kwargs)\n  File 
> \"/usr/local/lib/python3.5/site-packages/s3transfer/upload.py\", line 679, 
> in _main\n    client.put_object(Bucket=bucket, Key=key, Body=body, 
> **extra_args)\n  File 
> \"/usr/local/lib/python3.5/site-packages/botocore/client.py\", line 253, in 
> _api_call\n    return self._make_api_call(operation_name, kwargs)\n  File 
> \"/usr/local/lib/python3.5/site-packages/botocore/client.py\", line 525, in 
> _make_api_call\n    request_signer=self._request_signer, 
> context=request_context)\n  File 
> \"/usr/local/lib/python3.5/site-packages/botocore/hooks.py\", line 242, in 
> emit_until_response\n    responses = self._emit(event_name, kwargs, 
> stop_on_response=True)\n  File 
> \"/usr/local/lib/python3.5/site-packages/botocore/hooks.py\", line 210, in 
> _emit\n    response = handler(**kwargs)\n  File 
> \"/usr/local/lib/python3.5/site-packages/botocore/handlers.py\", line 200, 
> in conditionally_calculate_md5\n    calculate_md5(params, **kwargs)\n  File 
> \"/usr/local/lib/python3.5/site-packages/botocore/handlers.py\", line 178, 
> in calculate_md5\n    binary_md5 = _calculate_md5_from_file(body)\n  File 
> \"/usr/local/lib/python3.5/site-packages/botocore/handlers.py\", line 192, 
> in _calculate_md5_from_file\n    md5.update(chunk)\nTypeError: 
> Unicode-objects must be encoded before hashing\n",
>
> I am also getting this error showing up in django-watchman in regards to 
> this plugin.
>
> On Friday, April 14, 2017 at 4:10:06 PM UTC+1, 
> [email protected] wrote:
>>
>> I'll extend the readme with that information (
>> https://github.com/Pomax/filebrowser_s3/issues/1). in the mean time:
>>
>> AWS_ACCESS_KEY_ID - your AWS access key
>> AWS_SECRET_ACCESS_KEY - your AWS secret
>> AWS_STORAGE_BUCKET_NAME - the bucket name to use on your AWS account
>> AWS_STORAGE_ROOT - the name of the "directory" to use in your bucket
>> AWS_S3_CUSTOM_DOMAIN - whatever custom domain you need used, such as "
>> assets.mydomain.com"
>>
>> The AWS_LOCATION is effectively an alias for AWS_STORAGE_ROOT, and upon 
>> review shouldn't really be necessary. I've filed 
>> https://github.com/Pomax/filebrowser_s3/issues/2 to see if we can just 
>> take it out entirely, thanks for asking about it!
>>
>> On Friday, April 14, 2017 at 6:42:04 AM UTC-7, [email protected] wrote:
>>>
>>> Hi,
>>> What are these variables for? They don't seem to be documented:
>>>
>>> AWS_LOCATION = env('AWS_STORAGE_ROOT', default=None)
>>>
>>>
>>> On Friday, April 14, 2017 at 12:13:00 AM UTC+1, 
>>> [email protected] wrote:
>>>>
>>>> We decided to, rather than a PR, release the fix as a separate package 
>>>> that people can install alongside Mezzanine, that just "bolts on" to 
>>>> Mezzanine with pretty much zero effort:
>>>>
>>>> https://pypi.python.org/pypi/filebrowser-s3/ (this *should* be 
>>>> filebrowser_s3 but there's something weird with pypi)
>>>>
>>>> With associated github repo https://github.com/Pomax/filebrowser_s3 
>>>>
>>>> The REAMDE.md pretty much covers what is necessary to make it work: add 
>>>> it as installed app, and then make sure to set the storage variable to use 
>>>> the filebrowser_s3 storage class instead. 
>>>>
>>>> - Pomax
>>>>
>>>

-- 
You received this message because you are subscribed to the Google Groups 
"Mezzanine Users" 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