我一直在努力通過這個Udacity web dev course,並試圖嘗試使用this example將簡單的散景圖嵌入到網頁中。運行dev_appserver.py給出了錯誤:Bokeh是否與Google App Engine兼容?
ERROR 2017-01-22 14:35:30,358 wsgi.py:263]
Traceback (most recent call last):
File "C:\Users\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform
\google_appengine\google\appengine\runtime\wsgi.py", line 240, in Handle
handler = _config_handle.add_wsgi_middleware(self._LoadHandler())
File "C:\Users\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform
\google_appengine\google\appengine\runtime\wsgi.py", line 299, in _LoadHandler
handler, path, err = LoadObject(self._handler)
File "C:\Users\AppData\Local\Google\Cloud SDK\google-cloud-sdk\platform
\google_appengine\google\appengine\runtime\wsgi.py", line 85, in LoadObject
obj = __import__(path[0])
File "C:\Users\Google Drive\Udacity web development 2017\udacit
y-cs253\bokeh\1_docs_example\main.py", line 2, in <module>
from bokeh.plotting import figure
File "C:\Users\Google Drive\Udacity web development 2017\udacit
y-cs253\bokeh\1_docs_example\lib\bokeh\plotting\__init__.py", line 2, in <module
>
from ..document import Document; Document
File "C:\Users\Google Drive\Udacity web development 2017\udacit
y-cs253\bokeh\1_docs_example\lib\bokeh\document.py", line 45, in <module>
from .core.json_encoder import serialize_json
File "C:\Users\Google Drive\Udacity web development 2017\udacit
y-cs253\bokeh\1_docs_example\lib\bokeh\core\json_encoder.py", line 53, in <modul
e>
NP_MS_DELTA = np.timedelta64(1, 'ms')
TypeError: function takes at most 1 argument (2 given)
INFO 2017-01-22 14:35:30,571 module.py:806] default: "GET/HTTP/1.1" 500 -
我可能是錯的,但上面的錯誤與this聯合提出背景虛化需要NumPy的> 1.6.1。特別是它似乎需要NumPy> 1.6.1的json_encoder.py
。
但是Google App Engine only supports NumPy1.6.1。這是否意味着Bokeh實際上與GAE不兼容?
的app.yaml:
runtime: python27
api_version: 1
threadsafe: true
handlers:
- url: /.*
script: main.app
libraries:
- name: jinja2
version: latest
- name: numpy
version: "1.6.1"