Upload images to bucket via ImageField

21 views
Skip to first unread message

semi...@ipoint.ru

unread,
May 10, 2019, 11:05:06 AM5/10/19
to djangae-users
Hello!

I try to make ImageField works. I did as instructed https://djangae.readthedocs.io/en/latest/storage/
I set BUCKET_KEY and added PIL to app.yaml
In my local everything works great. But when I deployed app to the App Engine and tried to upload image I get 500 error. This is trace:

   2019-05-10 18:12:27.457 NOVTsuspended generator _make_token_async(rest_api.py:103) raised InternalError(5: ) (/base/alloc/tmpfs/dynamic_runtimes/python27g/7679791231c143f9/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py:468) 
2019-05-10 18:12:27.457 NOVTsuspended generator get_token_async(rest_api.py:214) raised InternalError(5: ) (/base/alloc/tmpfs/dynamic_runtimes/python27g/7679791231c143f9/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py:468)
2019-05-10 18:12:27.457 NOVTsuspended generator urlfetch_async(rest_api.py:247) raised InternalError(5: ) (/base/alloc/tmpfs/dynamic_runtimes/python27g/7679791231c143f9/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py:468)
2019-05-10 18:12:27.457 NOVTTasklet is <bound method _StorageApi.urlfetch_async of <cloudstorage.storage_api._StorageApi object at 0x2aaeaca69690>> (/base/data/home/apps/s~backend-dev/0-0-3.418084651507050586/sitepackages/prod/cloudstorage/api_utils.py:177)
2019-05-10 18:12:27.457 NOVTGot exception "InternalError('5: ',)" from tasklet. (/base/data/home/apps/s~backend-dev/0-0-3.418084651507050586/sitepackages/prod/cloudstorage/api_utils.py:197)
2019-05-10 18:12:27.458 NOVTRetry in 0.1 seconds. (/base/data/home/apps/s~backend-dev/0-0-3.418084651507050586/sitepackages/prod/cloudstorage/api_utils.py:198)
2019-05-10 18:12:27.578 NOVTsuspended generator _make_token_async(rest_api.py:103) raised InternalError(5: ) (/base/alloc/tmpfs/dynamic_runtimes/python27g/7679791231c143f9/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py:468)
2019-05-10 18:12:27.578 NOVTsuspended generator get_token_async(rest_api.py:214) raised InternalError(5: ) (/base/alloc/tmpfs/dynamic_runtimes/python27g/7679791231c143f9/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py:468)
2019-05-10 18:12:27.579 NOVTsuspended generator urlfetch_async(rest_api.py:247) raised InternalError(5: ) (/base/alloc/tmpfs/dynamic_runtimes/python27g/7679791231c143f9/python27/python27_lib/versions/1/google/appengine/ext/ndb/tasklets.py:468)
2019-05-10 18:12:27.579 NOVTGot exception "InternalError('5: ',)" from tasklet. (/base/data/home/apps/s~backend-dev/0-0-3.418084651507050586/sitepackages/prod/cloudstorage/api_utils.py:197)

What I'm doing wrong? Maybe this is a known issue?

Adam Alton

unread,
May 10, 2019, 12:39:34 PM5/10/19
to semi...@ipoint.ru, djangae-users
It looks like your code is using NDB, but the ImageField is for Django models (not NDB models).  It's hard to tell how/why NDB is involved in your traceback without seeing the code, but perhaps that is the issue?

If that's not the problem, you could look up what InternalError(5) is (i.e. what type of error does the '5' represent?), and maybe that will give you a clue.

Adam

--
You received this message because you are subscribed to the Google Groups "djangae-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to djangae-user...@googlegroups.com.
To post to this group, send email to djanga...@googlegroups.com.
To view this discussion on the web, visit https://groups.google.com/d/msgid/djangae-users/8eb1ce16-11f2-4a52-994b-d0424dc9768d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
Message has been deleted
0 new messages