- android - 多次调用 OnPrimaryClipChangedListener
- android - 无法更新 RecyclerView 中的 TextView 字段
- android.database.CursorIndexOutOfBoundsException : Index 0 requested, 光标大小为 0
- android - 使用 AppCompat 时,我们是否需要明确指定其 UI 组件(Spinner、EditText)颜色
编辑:我刚刚在 appengine 本身上尝试了一下,看起来它实际上在那里工作,所以问题只是出在开发服务器上。我仍然有兴趣了解为什么会发生这种情况......
我正在使用 AppEngine 映射器 API (mapreduce),并且在导入时遇到问题。这是我的文件结构:
├── [ost 12] app.yaml -> src/app.yaml
├── [ost 4096] doc
├── [ost 615] fabfile.py
├── [ost 18] gae -> /home/ost/dev/gae/
├── [ost 70] INFO
├── [ost 0] LICENSE
├── [ost 5] README
├── [ost 38] run_clean
├── [ost 64] run_deploy
├── [ost 83] run_pylint
├── [ost 78] run_tests
├── [ost 4096] src
│ ├── [ost 4096] admin
│ ├── [ost 504] app.yaml
│ ├── [ost 4822] data.py
│ ├── [ost 4096] dhandler
│ ├── [ost 2273] ds.html
│ ├── [ost 5424] generator.py
│ ├── [ost 0] __init__.py
│ ├── [ost 3527] lib.py
│ ├── [ost 4211] main.py
│ ├── [ost 457] mappers.py
│ ├── [ost 298] mapreduce.yaml
│ ├── [ost 4192] parser.py
│ └── [ost 4096] static
├── [ost 4096] test
│ └── [ost 2445] test_data.py
└── [ost 98] TODO
我的 app.yaml 是:
application: <removed>
version: 1
runtime: python
api_version: 1
builtins:
- datastore_admin: on
- appstats: on
handlers:
- url: /remote_api
script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
login: admin
- url: /admin
script: admin/admin.py
login: admin
- url: /dhandler/.*
script: dhandler/dhandler.py
- url: /mapreduce(/.*)?
script: $PYTHON_LIB/google/appengine/ext/mapreduce/main.py
login: admin
- url: /static
static_dir: static
- url: /.*
script: main.py
我的mapreduce.yaml:
mapreduce:
- name: insert-domain-mapper
params:
- name: done_callback
value: /dhandler/insert_job_done
mapper:
input_reader: google.appengine.ext.mapreduce.input_readers.BlobstoreLineInputReader
handler: mappers.insert_domain
params:
- name: blob_keys
default: ""
最后是mappers.py
from google.appengine.ext.mapreduce import operation as op
from data import RegisteredDomain, make_key, clean_domain
def insert_domain((byte_offset, line)):
domain = line
# TODO: domain validity check (??)
# clean domain
domain = clean_domain(domain)
# create domain entity
domain_entity = RegisteredDomain(key_name=make_key(domain))
# yield put operation
yield op.db.Put(domain_entity)
现在的问题是,虽然我可以加载/mapreduce 页面并且作业可用,但一旦我尝试启 Action 业,我就会收到以下错误(在页面上):
ImportError: Could not find 'input_readers' on path 'google.appengine.ext.mapreduce'
这是完整的堆栈跟踪:
DEBUG 2011-09-28 18:30:54,829 dev_appserver.py:3022] Executing CGI with env:
{'HTTP_ACCEPT': 'text/html,application/xhtml+xml,application/xml;q=0.9,*/*;q=0.8', 'HTTP_CONNECTION': 'keep-alive',
'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'HTTP_COOKIE': 'dev_appserver_login="test@example.com:True:1858
04764220139124118"', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'CURRENT_VERSION_ID': '1.1', 'SERVER_S
OFTWARE': 'Development/1.0', 'SCRIPT_NAME': '', 'USER_ORGANIZATION': '', 'REQUEST_METHOD': 'GET', 'HTTP_HOST': '10.1
.2.20:8000', 'PATH_INFO': '/mapreduce/status', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUERY_STRING': '', 'TZ': 'UTC', 'HTTP
_CACHE_CONTROL': 'max-age=0', 'USER_EMAIL': 'test@example.com', 'USER_IS_ADMIN': '1', 'CONTENT_LENGTH': '', 'USER_ID
': '185804764220139124118', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like G
ecko) Chrome/15.0.874.24 Safari/535.2', 'APPLICATION_ID': 'dev~domain-sandwich', 'SERVER_NAME': '10.1.2.20', 'REMOTE
_ADDR': '10.1.2.5', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'SDK_VERSION': '1.5.2'
, 'PATH_TRANSLATED': '/home/ost/dev/gae/google/appengine/ext/mapreduce/main.py', 'SERVER_PORT': '8000', 'AUTH_DOMAIN
': 'gmail.com'}
DEBUG 2011-09-28 18:30:54,830 dev_appserver.py:2721] Reusing main() function of module "google.appengine.ext.mapr
educe.main"
INFO 2011-09-28 18:30:54,841 dev_appserver.py:4248] "GET /mapreduce/status HTTP/1.1" 200 -
DEBUG 2011-09-28 18:30:54,843 dev_appserver_index.py:172] No need to update index.yaml
DEBUG 2011-09-28 18:30:54,890 dev_appserver.py:589] Matched "/mapreduce/base.css" to CGI dispatcher with path $PY
THON_LIB/google/appengine/ext/mapreduce/main.py
DEBUG 2011-09-28 18:30:54,894 dev_appserver.py:3022] Executing CGI with env:
{'HTTP_ACCEPT': 'text/css,*/*;q=0.1', 'HTTP_CONNECTION': 'keep-alive', 'CONTENT_TYPE': 'application/x-www-form-urlen
coded', 'HTTP_REFERER': 'http://10.1.2.20:8000/mapreduce/status', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q
=0.3', 'CURRENT_VERSION_ID': '1.1', 'SERVER_SOFTWARE': 'Development/1.0', 'SCRIPT_NAME': '', 'USER_ORGANIZATION': ''
, 'REQUEST_METHOD': 'GET', 'HTTP_HOST': '10.1.2.20:8000', 'PATH_INFO': '/mapreduce/base.css', 'SERVER_PROTOCOL': 'HT
TP/1.0', 'QUERY_STRING': '', 'TZ': 'UTC', 'USER_EMAIL': 'test@example.com', 'USER_IS_ADMIN': '1', 'CONTENT_LENGTH':
'', 'USER_ID': '185804764220139124118', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (K
HTML, like Gecko) Chrome/15.0.874.24 Safari/535.2', 'APPLICATION_ID': 'dev~domain-sandwich', 'HTTP_COOKIE': 'dev_app
server_login="test@example.com:True:185804764220139124118"', 'SERVER_NAME': '10.1.2.20', 'REMOTE_ADDR': '10.1.2.5',
'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'SDK_VERSION': '1.5.2', 'PATH_TRANSLATED':
'/home/ost/dev/gae/google/appengine/ext/mapreduce/main.py', 'SERVER_PORT': '8000', 'AUTH_DOMAIN': 'gmail.com'}
DEBUG 2011-09-28 18:30:54,895 dev_appserver.py:2721] Reusing main() function of module "google.appengine.ext.mapr
educe.main"
INFO 2011-09-28 18:30:54,902 dev_appserver.py:4248] "GET /mapreduce/base.css HTTP/1.1" 200 -
DEBUG 2011-09-28 18:30:54,903 dev_appserver_index.py:172] No need to update index.yaml
DEBUG 2011-09-28 18:30:54,911 dev_appserver.py:589] Matched "/mapreduce/jquery.js" to CGI dispatcher with path $P
YTHON_LIB/google/appengine/ext/mapreduce/main.py
DEBUG 2011-09-28 18:30:54,915 dev_appserver.py:3022] Executing CGI with env:
{'HTTP_ACCEPT': '*/*', 'HTTP_CONNECTION': 'keep-alive', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'HTTP_R
EFERER': 'http://10.1.2.20:8000/mapreduce/status', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'CURRENT
_VERSION_ID': '1.1', 'SERVER_SOFTWARE': 'Development/1.0', 'SCRIPT_NAME': '', 'USER_ORGANIZATION': '', 'REQUEST_METH
OD': 'GET', 'HTTP_HOST': '10.1.2.20:8000', 'PATH_INFO': '/mapreduce/jquery.js', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUER
Y_STRING': '', 'TZ': 'UTC', 'USER_EMAIL': 'test@example.com', 'USER_IS_ADMIN': '1', 'CONTENT_LENGTH': '', 'USER_ID':
'185804764220139124118', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gec
ko) Chrome/15.0.874.24 Safari/535.2', 'APPLICATION_ID': 'dev~domain-sandwich', 'HTTP_COOKIE': 'dev_appserver_login="
test@example.com:True:185804764220139124118"', 'SERVER_NAME': '10.1.2.20', 'REMOTE_ADDR': '10.1.2.5', 'GATEWAY_INTER
FACE': 'CGI/1.1', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'SDK_VERSION': '1.5.2', 'PATH_TRANSLATED': '/home/ost/de
v/gae/google/appengine/ext/mapreduce/main.py', 'SERVER_PORT': '8000', 'AUTH_DOMAIN': 'gmail.com'}
DEBUG 2011-09-28 18:30:54,916 dev_appserver.py:2721] Reusing main() function of module "google.appengine.ext.mapr
educe.main"
INFO 2011-09-28 18:30:54,924 dev_appserver.py:4248] "GET /mapreduce/jquery.js HTTP/1.1" 200 -
DEBUG 2011-09-28 18:30:54,931 dev_appserver_index.py:172] No need to update index.yaml
DEBUG 2011-09-28 18:30:54,938 dev_appserver.py:589] Matched "/mapreduce/status.js" to CGI dispatcher with path $P
YTHON_LIB/google/appengine/ext/mapreduce/main.py
DEBUG 2011-09-28 18:30:54,942 dev_appserver.py:3022] Executing CGI with env:
{'HTTP_ACCEPT': '*/*', 'HTTP_CONNECTION': 'keep-alive', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'HTTP_R
EFERER': 'http://10.1.2.20:8000/mapreduce/status', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'CURRENT
_VERSION_ID': '1.1', 'SERVER_SOFTWARE': 'Development/1.0', 'SCRIPT_NAME': '', 'USER_ORGANIZATION': '', 'REQUEST_METH
OD': 'GET', 'HTTP_HOST': '10.1.2.20:8000', 'PATH_INFO': '/mapreduce/status.js', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUER
Y_STRING': '', 'TZ': 'UTC', 'USER_EMAIL': 'test@example.com', 'USER_IS_ADMIN': '1', 'CONTENT_LENGTH': '', 'USER_ID':
'185804764220139124118', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHTML, like Gec
ko) Chrome/15.0.874.24 Safari/535.2', 'APPLICATION_ID': 'dev~domain-sandwich', 'HTTP_COOKIE': 'dev_appserver_login="
test@example.com:True:185804764220139124118"', 'SERVER_NAME': '10.1.2.20', 'REMOTE_ADDR': '10.1.2.5', 'GATEWAY_INTER
FACE': 'CGI/1.1', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'SDK_VERSION': '1.5.2', 'PATH_TRANSLATED': '/home/ost/de
v/gae/google/appengine/ext/mapreduce/main.py', 'SERVER_PORT': '8000', 'AUTH_DOMAIN': 'gmail.com'}
DEBUG 2011-09-28 18:30:54,943 dev_appserver.py:2721] Reusing main() function of module "google.appengine.ext.mapr
educe.main"
INFO 2011-09-28 18:30:54,951 dev_appserver.py:4248] "GET /mapreduce/status.js HTTP/1.1" 200 -
DEBUG 2011-09-28 18:30:54,953 dev_appserver_index.py:172] No need to update index.yaml
DEBUG 2011-09-28 18:30:54,972 dev_appserver.py:589] Matched "/mapreduce/command/list_configs" to CGI dispatcher w
ith path $PYTHON_LIB/google/appengine/ext/mapreduce/main.py
DEBUG 2011-09-28 18:30:54,976 dev_appserver.py:3022] Executing CGI with env:
{'HTTP_ACCEPT': 'text/plain, */*', 'HTTP_CONNECTION': 'keep-alive', 'USER_IS_ADMIN': '1', 'HTTP_COOKIE': 'dev_appser
ver_login="test@example.com:True:185804764220139124118"', 'CURRENT_VERSION_ID': '1.1', 'SERVER_SOFTWARE': 'Developme
nt/1.0', 'SCRIPT_NAME': '', 'USER_ORGANIZATION': '', 'USER_ID': '185804764220139124118', 'REQUEST_METHOD': 'GET', 'H
TTP_HOST': '10.1.2.20:8000', 'PATH_INFO': '/mapreduce/command/list_configs', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUERY_S
TRING': '', 'TZ': 'UTC', 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest', 'USER_EMAIL': 'test@example.com', 'CONTENT_LENGT
H': '', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WO
W64) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.24 Safari/535.2', 'APPLICATION_ID': 'dev~domain-sandwich'
, 'HTTP_REFERER': 'http://10.1.2.20:8000/mapreduce/status', 'SERVER_NAME': '10.1.2.20', 'REMOTE_ADDR': '10.1.2.5', '
CONTENT_TYPE': 'application/x-www-form-urlencoded', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT_LANGUAGE': 'en-US,e
n;q=0.8', 'SDK_VERSION': '1.5.2', 'PATH_TRANSLATED': '/home/ost/dev/gae/google/appengine/ext/mapreduce/main.py', 'SE
RVER_PORT': '8000', 'AUTH_DOMAIN': 'gmail.com'}
DEBUG 2011-09-28 18:30:54,977 dev_appserver.py:2721] Reusing main() function of module "google.appengine.ext.mapr
educe.main"
INFO 2011-09-28 18:30:54,991 dev_appserver.py:4248] "GET /mapreduce/command/list_configs HTTP/1.1" 200 -
DEBUG 2011-09-28 18:30:54,992 dev_appserver_index.py:172] No need to update index.yaml
DEBUG 2011-09-28 18:30:54,999 dev_appserver.py:589] Matched "/mapreduce/command/list_jobs" to CGI dispatcher with
path $PYTHON_LIB/google/appengine/ext/mapreduce/main.py
DEBUG 2011-09-28 18:30:55,003 dev_appserver.py:3022] Executing CGI with env:
{'HTTP_ACCEPT': 'text/plain, */*', 'HTTP_CONNECTION': 'keep-alive', 'USER_IS_ADMIN': '1', 'HTTP_COOKIE': 'dev_appser
ver_login="test@example.com:True:185804764220139124118"', 'CURRENT_VERSION_ID': '1.1', 'SERVER_SOFTWARE': 'Developme
nt/1.0', 'SCRIPT_NAME': '', 'USER_ORGANIZATION': '', 'USER_ID': '185804764220139124118', 'REQUEST_METHOD': 'GET', 'H
TTP_HOST': '10.1.2.20:8000', 'PATH_INFO': '/mapreduce/command/list_jobs', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUERY_STRI
NG': '', 'TZ': 'UTC', 'HTTP_X_REQUESTED_WITH': 'XMLHttpRequest', 'USER_EMAIL': 'test@example.com', 'CONTENT_LENGTH':
'', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64
) AppleWebKit/535.2 (KHTML, like Gecko) Chrome/15.0.874.24 Safari/535.2', 'APPLICATION_ID': 'dev~domain-sandwich', '
HTTP_REFERER': 'http://10.1.2.20:8000/mapreduce/status', 'SERVER_NAME': '10.1.2.20', 'REMOTE_ADDR': '10.1.2.5', 'CON
TENT_TYPE': 'application/x-www-form-urlencoded', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q
=0.8', 'SDK_VERSION': '1.5.2', 'PATH_TRANSLATED': '/home/ost/dev/gae/google/appengine/ext/mapreduce/main.py', 'SERVE
R_PORT': '8000', 'AUTH_DOMAIN': 'gmail.com'}
DEBUG 2011-09-28 18:30:55,003 dev_appserver.py:2721] Reusing main() function of module "google.appengine.ext.mapr
educe.main"
INFO 2011-09-28 18:30:55,012 dev_appserver.py:4248] "GET /mapreduce/command/list_jobs HTTP/1.1" 200 -
DEBUG 2011-09-28 18:30:55,013 dev_appserver_index.py:172] No need to update index.yaml
DEBUG 2011-09-28 18:30:55,019 dev_appserver.py:589] Matched "/favicon.ico" to CGI dispatcher with path main.py
DEBUG 2011-09-28 18:30:55,022 dev_appserver.py:3022] Executing CGI with env:
{'HTTP_ACCEPT': '*/*', 'HTTP_CONNECTION': 'keep-alive', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'HTTP_C
OOKIE': 'dev_appserver_login="test@example.com:True:185804764220139124118"', 'HTTP_ACCEPT_CHARSET': 'ISO-8859-1,utf-
8;q=0.7,*;q=0.3', 'CURRENT_VERSION_ID': '1.1', 'SERVER_SOFTWARE': 'Development/1.0', 'SCRIPT_NAME': '', 'USER_ORGANI
ZATION': '', 'REQUEST_METHOD': 'GET', 'HTTP_HOST': '10.1.2.20:8000', 'PATH_INFO': '/favicon.ico', 'SERVER_PROTOCOL':
'HTTP/1.0', 'QUERY_STRING': '', 'TZ': 'UTC', 'USER_EMAIL': 'test@example.com', 'USER_IS_ADMIN': '1', 'CONTENT_LENGT
H': '', 'USER_ID': '185804764220139124118', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.
2 (KHTML, like Gecko) Chrome/15.0.874.24 Safari/535.2', 'APPLICATION_ID': 'dev~domain-sandwich', 'SERVER_NAME': '10.
1.2.20', 'REMOTE_ADDR': '10.1.2.5', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;q=0.8', 'SDK_V
ERSION': '1.5.2', 'PATH_TRANSLATED': '/home/ost/dev/domain-sandwich/src/main.py', 'SERVER_PORT': '8000', 'AUTH_DOMAI
N': 'gmail.com'}
DEBUG 2011-09-28 18:30:55,022 dev_appserver.py:2721] Reusing main() function of module "main"
INFO 2011-09-28 18:30:55,028 dev_appserver.py:4248] "GET /favicon.ico HTTP/1.1" 404 -
DEBUG 2011-09-28 18:30:55,029 dev_appserver_index.py:172] No need to update index.yaml
DEBUG 2011-09-28 18:30:56,662 dev_appserver.py:589] Matched "/mapreduce/command/start_job" to CGI dispatcher with
path $PYTHON_LIB/google/appengine/ext/mapreduce/main.py
DEBUG 2011-09-28 18:30:56,670 dev_appserver.py:3022] Executing CGI with env:
{'HTTP_COOKIE': 'dev_appserver_login="test@example.com:True:185804764220139124118"', 'SERVER_SOFTWARE': 'Development
/1.0', 'SCRIPT_NAME': '', 'REQUEST_METHOD': 'POST', 'PATH_INFO': '/mapreduce/command/start_job', 'HTTP_ORIGIN': 'htt
p://10.1.2.20:8000', 'SERVER_PROTOCOL': 'HTTP/1.0', 'QUERY_STRING': '', 'CONTENT_LENGTH': '232', 'HTTP_ACCEPT_CHARSE
T': 'ISO-8859-1,utf-8;q=0.7,*;q=0.3', 'HTTP_USER_AGENT': 'Mozilla/5.0 (Windows NT 6.1; WOW64) AppleWebKit/535.2 (KHT
ML, like Gecko) Chrome/15.0.874.24 Safari/535.2', 'TZ': 'UTC', 'HTTP_REFERER': 'http://10.1.2.20:8000/mapreduce/stat
us', 'SERVER_NAME': '10.1.2.20', 'REMOTE_ADDR': '10.1.2.5', 'SDK_VERSION': '1.5.2', 'PATH_TRANSLATED': '/home/ost/de
v/gae/google/appengine/ext/mapreduce/main.py', 'SERVER_PORT': '8000', 'USER_IS_ADMIN': '1', 'HTTP_X_REQUESTED_WITH':
'XMLHttpRequest', 'CURRENT_VERSION_ID': '1.1', 'USER_ORGANIZATION': '', 'USER_ID': '185804764220139124118', 'HTTP_H
OST': '10.1.2.20:8000', 'HTTP_CONNECTION': 'keep-alive', 'USER_EMAIL': 'test@example.com', 'HTTP_ACCEPT': 'text/plai
n, */*', 'APPLICATION_ID': 'dev~domain-sandwich', 'GATEWAY_INTERFACE': 'CGI/1.1', 'HTTP_ACCEPT_LANGUAGE': 'en-US,en;
q=0.8', 'CONTENT_TYPE': 'application/x-www-form-urlencoded', 'AUTH_DOMAIN': 'gmail.com'}
DEBUG 2011-09-28 18:30:56,671 dev_appserver.py:2721] Reusing main() function of module "google.appengine.ext.mapr
educe.main"
DEBUG 2011-09-28 18:30:56,688 dev_appserver.py:2198] Could not import "_io": Disallowed C-extension or built-in m
odule
DEBUG 2011-09-28 18:30:56,689 util.py:105] Could not import BlobstoreLineInputReader from google.appengine.ext.ma
preduce.input_readers. Will try recursively.
Traceback (most recent call last):
File "/home/ost/dev/gae/google/appengine/ext/mapreduce/util.py", line 90, in for_name
result = __import__(module_name, None, None, [short_name])
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2503, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2375, in FindAndLoadModule
description)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2318, in LoadModuleRestricted
description)
File "/home/ost/dev/gae/google/appengine/ext/mapreduce/input_readers.py", line 59, in <module>
import zipfile
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2503, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2375, in FindAndLoadModule
description)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2318, in LoadModuleRestricted
description)
File "/usr/lib/python2.7/zipfile.py", line 6, in <module>
import io
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2503, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2375, in FindAndLoadModule
description)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2318, in LoadModuleRestricted
description)
File "/usr/lib/python2.7/io.py", line 60, in <module>
import _io
ImportError: No module named _io
DEBUG 2011-09-28 18:30:56,698 dev_appserver.py:2198] Could not import "_io": Disallowed C-extension or built-in m
odule
DEBUG 2011-09-28 18:30:56,698 util.py:105] Could not import input_readers from google.appengine.ext.mapreduce. Wi
ll try recursively.
Traceback (most recent call last):
File "/home/ost/dev/gae/google/appengine/ext/mapreduce/util.py", line 90, in for_name
result = __import__(module_name, None, None, [short_name])
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2503, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2375, in FindAndLoadModule
description)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2318, in LoadModuleRestricted
description)
File "/home/ost/dev/gae/google/appengine/ext/mapreduce/input_readers.py", line 59, in <module>
import zipfile
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2503, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2375, in FindAndLoadModule
description)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2318, in LoadModuleRestricted
description)
File "/usr/lib/python2.7/zipfile.py", line 6, in <module>
import io
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2503, in load_module
return self.FindAndLoadModule(submodule, fullname, search_path)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2375, in FindAndLoadModule
description)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 1538, in Decorate
return func(self, *args, **kwargs)
File "/home/ost/dev/gae/google/appengine/tools/dev_appserver.py", line 2318, in LoadModuleRestricted
description)
File "/usr/lib/python2.7/io.py", line 60, in <module>
import _io
ImportError: No module named _io
ERROR 2011-09-28 18:30:56,702 base_handler.py:140] Error in JsonHandler, returning exception.
Traceback (most recent call last):
File "/home/ost/dev/gae/google/appengine/ext/mapreduce/base_handler.py", line 133, in _handle_wrapper
self.handle()
File "/home/ost/dev/gae/google/appengine/ext/mapreduce/handlers.py", line 762, in handle
_app=mapper_params.get("_app"))
File "/home/ost/dev/gae/google/appengine/ext/mapreduce/handlers.py", line 826, in _start_map
mapper_input_reader_class = mapper_spec.input_reader_class()
File "/home/ost/dev/gae/google/appengine/ext/mapreduce/model.py", line 408, in input_reader_class
return util.for_name(self.input_reader_spec)
File "/home/ost/dev/gae/google/appengine/ext/mapreduce/util.py", line 109, in for_name
module = for_name(module_name, recursive=True)
File "/home/ost/dev/gae/google/appengine/ext/mapreduce/util.py", line 117, in for_name
short_name, module_name))
ImportError: Could not find 'input_readers' on path 'google.appengine.ext.mapreduce' (????)
INFO 2011-09-28 18:30:56,710 dev_appserver.py:4248] "POST /mapreduce/command/start_job HTTP/1.1" 200 -
DEBUG 2011-09-28 18:30:56,711 dev_appserver_index.py:172] No need to update index.yaml
最佳答案
这可能与我遇到的问题相同——我在本地环境中使用 2.7 版本的 Python 解释器。当我切换到 2.5 时,它工作正常。
关于python - AppEngine 映射器 API 导入错误,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7587675/
我之前让 dll 注入(inject)器变得简单,但我有 Windows 7,我用 C# 和 C++ 做了它,它工作得很好!但是现在当我在 Windows 8 中尝试相同的代码时,它似乎没有以正确的方
我正在尝试制作一个名为 core-splitter 的元素,该元素在 1.0 中已弃用,因为它在我们的项目中起着关键作用。 如果您不知道 core-splitter 的作用,我可以提供一个简短的描述。
我有几个不同的蜘蛛,想一次运行所有它们。基于 this和 this ,我可以在同一个进程中运行多个蜘蛛。但是,我不知道如何设计一个信号系统来在所有蜘蛛都完成后停止 react 器。 我试过了: cra
有没有办法在达到特定条件时停止扭曲 react 器。例如,如果一个变量被设置为某个值,那么 react 器应该停止吗? 最佳答案 理想情况下,您不会将变量设置为一个值并停止 react 器,而是调用
https://code.angularjs.org/1.0.0rc9/angular-1.0.0rc9.js 上面的链接定义了外部js文件,我不知道Angular-1.0.0rc9.js的注入(in
我正在尝试运行一个函数并将服务注入(inject)其中。我认为这可以使用 $injector 轻松完成.所以我尝试了以下(简化示例): angular.injector().invoke( [ "$q
在 google Guice 中,我可以使用函数 createInjector 创建基于多个模块的注入(inject)器。 因为我使用 GWT.create 在 GoogleGin 中实例化注入(in
我在 ASP.NET Core 1.1 解决方案中使用配置绑定(bind)。基本上,我在“ConfigureServices Startup”部分中有一些用于绑定(bind)的简单代码,如下所示: s
我在 Spring MVC 中设置 initBinder 时遇到一些问题。我有一个 ModelAttribute,它有一个有时会显示的字段。 public class Model { privat
我正在尝试通过jquery post发布knockoutjs View 模型 var $form = $('#barcodeTemplate form'); var data = ko.toJS(vm
如何为包含多态对象集合的复杂模型编写自定义模型绑定(bind)程序? 我有下一个模型结构: public class CustomAttributeValueViewModel { publi
您好,我正在尝试实现我在 this article 中找到的扩展方法对于简单的注入(inject)器,因为它不支持开箱即用的特定构造函数的注册。 根据这篇文章,我需要用一个假的委托(delegate)
你好,我想自动注册我的依赖项。 我现在拥有的是: public interface IRepository where T : class public interface IFolderReposi
我正在使用 Jasmine 测试一些 Angular.js 代码。为此,我需要一个 Angular 注入(inject)器: var injector = angular.injector(['ng'
我正在使用 Matlab 代码生成器。不可能包含代码风格指南。这就是为什么我正在寻找一个工具来“ reshape ”、重命名和重新格式化生成的代码,根据我的: 功能横幅约定 文件横幅约定 命名约定 等
这个问题在这里已经有了答案: Where and why do I have to put the "template" and "typename" keywords? (8 个答案) 关闭 8
我开发了一种工具,可以更改某些程序的外观。为此,我需要在某些进程中注入(inject)一个 dll。 现在我基本上使用这个 approach .问题通常是人们无法注入(inject) dll,因为他们
我想使用 swing、spring 和 hibernate 编写一个 java 应用程序。 我想使用数据绑定(bind)器用 bean 的值填充 gui,并且我还希望它反射(reflect) gui
我有这段代码,当两个蜘蛛完成后,程序仍在运行。 #!C:\Python27\python.exe from twisted.internet import reactor from scrapy.cr
要点是 Spring Batch (v2) 测试框架具有带有 @Autowired 注释的 JobLauncherTestUtils.setJob。我们的测试套件有多个 Job 类提供者。因为这个类不
我是一名优秀的程序员,十分优秀!