Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Google App Engine has suddenly stopped working, with error 'you are likely missing the Python "PIL" module'

I've been developing apps on GAE (with Windows/Python) for over a year and although I'm no expert, I've always been able to get the apps to run!

The app I'm currently working on was working fine on the localhost at lunchtime today. Without making any changes, I've come to it this evening and the app won't run in the App Engine launcher, comes up with a warning triangle when I try and gives the following in the log:

INFO     2013-12-03 23:46:06,766 devappserver2.py:557] Skipping SDK update check.
WARNING  2013-12-03 23:46:06,776 api_server.py:317] Could not initialize images API; you are likely missing the Python "PIL" module.
Traceback (most recent call last):
  File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 184, in <module>
_run_file(__file__, globals())
  File "C:\Program Files (x86)\Google\google_appengine\dev_appserver.py", line 180, in _run_file
execfile(script_path, globals_)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 727, in <module>
main()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 720, in main
dev_server.start(options)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\devappserver2.py", line 685, in start
default_gcs_bucket_name=options.default_gcs_bucket_name)
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\tools\devappserver2\api_server.py", line 349, in setup_stubs
simple_search_stub.SearchServiceStub(index_file=search_index_path))
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\search\simple_search_stub.py", line 607, in __init__
self.Read()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\search\simple_search_stub.py", line 1020, in Read
read_indexes = self._ReadFromFile()
  File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\search\simple_search_stub.py", line 994, in _ReadFromFile
version, indexes = pickle.load(open(self.__index_file, 'rb'))
EOFError
2013-12-03 23:46:06 (Process exited with code 1)

I have tried running the Hello, World app as I know it was working fine before, as well as several other apps that I have developed which were all previously working fine, and all throw the same error.

I just don't really understand what could have changed in the meantime. Any light that anyone can shed would be gratefully received!

like image 353
user2550297 Avatar asked Mar 22 '23 10:03

user2550297


2 Answers

Forget about the PIL bit it's just a warning

You need to read the stacktrace and the last line is the most important

File "C:\Program Files (x86)\Google\google_appengine\google\appengine\api\search\simple_search_stub.py", line 994, in _ReadFromFile version, indexes = pickle.load(open(self.__index_file, 'rb')) EOFError

From this is it tells me the search service can not open an index file and can't be started. Have you upgraded the SDK, moved something.

I suggest you set the search indexes path explicitly and or clear the indexes. See command line

--search_indexes_path SEARCH_INDEXES_PATH
                    path to a file used to store search indexes (defaults
                    to a file in --storage_path if not set) (default:
                    None)
--clear_search_indexes [CLEAR_SEARCH_INDEXES] 
                    clear the search indexes (default: False)` 
like image 151
Tim Hoffman Avatar answered Apr 06 '23 08:04

Tim Hoffman


I get it resolved by deleting datastore at

\users...\appdata\local\tmp\dev_appserver.datastore

like image 28
khichar.anil Avatar answered Apr 06 '23 06:04

khichar.anil