0

I am trying to install tldextract on my Google App Engine app but I don't manage to get the .tld_set_snapshot file accessed either locally or once the app is deployed. Here is my app directories structure:

static/
templates/
tldextract/
  .tld_set_snapshot
  __init__.py
  tldextract.py

I guess it's a silly thing but I couldn't find the solution. Thanks.

matt1101
  • 23
  • 1
  • 5
  • And how does `tidextract.py` try to read `.tid_set_snapshot`? Code pls? – Alex Martelli Jan 18 '15 at 03:56
  • @AlexMartelli the code can be accessed there [tldextract.py](https://github.com/john-kurkowski/tldextract/blob/master/tldextract/tldextract.py). The issue is that it is not clear to me how tldextract.py reads .tld_set_snapshot. – matt1101 Jan 18 '15 at 04:15
  • Got it -- reads it in a fancy way but does read it. So is that dot-named file getting uploaded? (Locally shd be OK, though so I don't understand why your code fails locally...). – Alex Martelli Jan 18 '15 at 04:39
  • Locally I get the following error: File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/devappserver2/python/stubs.py", line 250, in __init__ raise IOError(errno.EACCES, 'file not accessible', filename) IOError: [Errno 13] file not accessible: '/Users/username/projectname/tldextract/.tld_set_snapshot' – matt1101 Jan 18 '15 at 07:11
  • Does `ls -l /Users/username/projectname/tldextract/.tld_set_snapshot'` say about that file? If so, then it seems you're running afoul of the `is_file_accessible` check in the `stubs.py` you mention. I imaging you *have* set `application_readable` in your `app.yaml` for this directory, right? See it at https://cloud.google.com/appengine/docs/python/config/appconfig . – Alex Martelli Jan 18 '15 at 15:50
  • ls -l says: `-rwxr-xr-x@ 1 username staff 127075 Dec 5 11:22 .tld_set_snapshot`. Yes, I have set `application_readable` as true. – matt1101 Jan 18 '15 at 21:09
  • Recent issue: https://github.com/john-kurkowski/tldextract/issues/106 – floer32 Aug 23 '16 at 17:18
  • Any latest info on how tldextract works on the old google app engine pythong 2.7? – Michael Jun 10 '20 at 16:50

0 Answers0