- c - 在位数组中找到第一个零
- linux - Unix 显示有关匹配两种模式之一的文件的信息
- 正则表达式替换多个文件
- linux - 隐藏来自 xtrace 的命令
我正在做一些应该很简单的事情,却一遍又一遍地卡住了。将非常简单的 csv 文件上传到我的开发服务器时出现此错误:
Error in WorkerThread-0: app "dev~fbdec" cannot access app "fbdec"'s data
确切的输出是:
[INFO ] Logging to bulkloader-log-20110815.142554
[INFO ] Throttling transfers:
[INFO ] Bandwidth: 250000 bytes/second
[INFO ] HTTP connections: 8/second
[INFO ] Entities inserted/fetched/modified: 20/second
[INFO ] Batch Size: 10
[INFO ] Opening database: bulkloader-progress-20110815.142554.sql3
Please enter login credentials for localhost
Email: a@a.com
Password for a@a.com:
[INFO ] Connecting to localhost:8080/remote_api
[INFO ] Skipping header line.
[INFO ] Starting import; maximum 10 entities per post
[ERROR ] [WorkerThread-0] WorkerThread:
Traceback (most recent call last):
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/adaptive_thread_pool.py", line 176, in WorkOnItems
status, instruction = item.PerformWork(self.__thread_pool)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/bulkloader.py", line 764, in PerformWork
transfer_time = self._TransferItem(thread_pool)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/bulkloader.py", line 935, in _TransferItem
self.request_manager.PostEntities(self.content)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/tools/bulkloader.py", line 1418, in PostEntities
datastore.Put(entities)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/datastore.py", line 467, in Put
return PutAsync(entities, **kwargs).get_result()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_rpc.py", line 658, in get_result
results = self.__rpcs[0].get_result()
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/api/apiproxy_stub_map.py", line 592, in get_result
return self.__get_result_hook(self)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1385, in __put_hook
self.check_rpc_success(rpc)
File "/Applications/GoogleAppEngineLauncher.app/Contents/Resources/GoogleAppEngine-default.bundle/Contents/Resources/google_appengine/google/appengine/datastore/datastore_rpc.py", line 1074, in check_rpc_success
raise _ToDatastoreError(err)
BadRequestError: app "dev~fbdec" cannot access app "fbdec"'s data
[INFO ] An error occurred. Shutting down...
[ERROR ] Error in WorkerThread-0: app "dev~fbdec" cannot access app "fbdec"'s data
[INFO ] 2 entities total, 0 previously transferred
[INFO ] 0 entities (723 bytes) transferred in 7.9 seconds
[INFO ] Some entities not successfully transferred
这是 app.yaml 文件:
application: fbdec
version: 1
runtime: python
api_version: 1
handlers:
- url: /static
static_dir: static
- url: /remote_api
script: $PYTHON_LIB/google/appengine/ext/remote_api/handler.py
login: admin
- url: /.*
script: fbdec.py
这是执行上传的 shell 调用:
appcfg.py upload_data --config_file=fbdec/fbuploader.py --filename=cols.csv --kind=Cols --has_header --num_threads=1 --url=http://localhost:8080/remote_api fbdec/
这是上传代码:
import cgi
import datetime
import logging
import os
import datetime
from google.appengine.ext import db
from google.appengine.tools import bulkloader
from os import environ
class Grobs(db.Model):
coleccion = db.TextProperty()
objeto= db.TextProperty()
descripcion = db.TextProperty()
class GrobLoader(bulkloader.Loader):
def __init__(self):
bulkloader.Loader.__init__(self, 'Grobs',
[('coleccion', str),
('objeto', str),
('descripcion', str)
])
class Cols(db.Model):
coleccion = db.TextProperty()
descripcion= db.TextProperty()
class ColLoader(bulkloader.Loader):
def __init__(self):
bulkloader.Loader.__init__(self, 'Cols',
[('coleccion', str),
('descripcion', str)
])
loaders = [GrobLoader, ColLoader]
这是 cols.csv 文件:
coleccion,descripcion
gafas,descripcion
sombreros,descripcion
我们非常欢迎任何帮助。我不知道我做错了什么。
我在 Mac Osx Leopard 上使用 Appengine 1.5.2。我已经尝试了 python 2.5.4 和 2.6.6(以防万一)。
在此先致谢并致以最诚挚的问候!
最佳答案
启动 dev_appserver 时,传递 --default_partition=""
参数。
关于python - 使用开发服务器的 Appengine BulkLoader 问题,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/7065121/
我正在尝试将gradle appengine plugin与我的项目一起使用,但SDK的软件包未得到解决。 我在网上看到很多Maven资料库的引用资料:com.google.appengine:app
我对 gradle 概念很陌生。我正在为应用程序引擎做 gradle (我不知道 maven 或 ant),我经历了 [https://cloud.google.com/appengine/docs/
我使用 maven 3.3.9 使用命令 mvn archetype:generate 创建了一个项目,然后搜索端点 archtype 并选择它,然后插入 groupid artifectId 版本.
这个问题已经有答案了: 已关闭12 年前。 Possible Duplicate: How to implement “autoincrement” on Google AppEngine 我在 Ap
对于我的小框架 Pyxer我希望也能够在 AppEngine 项目之外使用 Google AppEngine 数据存储,因为我现在已经习惯了这种 ORM 模式,对于一些快速的破解来说,这很好。由于文件
我正在尝试 GAE Java 灵活环境并在我的构建脚本中使用“com.google.appengine:gradle-appengine-plugin:gradle-appengine-plugin”
我是 GAE 的大菜鸟,Python 水平中等,Java 中等至生疏。我希望将现有的可用 GAE Java 应用程序(在 Google Play 商店中并在 Android 上运行)转换为 GAE P
我的 AppEngine Java8 应用程序缺少 appengine-api-1.0-sdk-1.9.77.jar。无论我调用什么 servlet,我都会收到此错误 java.lang.NoClas
我正在尝试在请求中获取地区和国家。我认为可以在对 AppEngine 的每个请求中获取 X-AppEngine-Region 和 X-AppEngine-Country header ,但它们丢失了。
我们正在从非官方的“kidleit”maven 插件切换为使用官方的“appengine-maven-plugin”http://code.google.com/p/appengine-maven-p
我正在构建一个 Maven 应用程序,我想将其部署在 Java 的 Google 应用程序引擎上。 我尝试在本地服务器中进行测试 localhost:8080 当我运行命令mvn clean pack
如何在 AppEngine 中使用 X-AppEngine-Estimated-CPM-US-Dollars header 。我读了一些文档,我们可以只使用管理员凭据来使用它,这是什么意思? 如果您有
当我尝试使用 appengine-maven-plugin 更新 appengine-application 时出现以下错误: 400 Bad Request Error when loading a
当我尝试在 AppEngine 中使用低级 DataStore API 时,我收到了一个有趣的 ClassNotFoundException。此异常发生在云服务器中,而不是本地实例中。我在本地使用 a
我在尝试运行我的应用程序时遇到以下错误 from oauth2client.appengine import oauth2decorator_from_clientsecrets ImportErro
情况 我正在使用 AppEngine Cloud Endpoints (Java)作为我的 Android 应用程序的后端服务器。在 Cron-Job 中,服务器定期下载新数据(字符串),过滤掉相关信
我有一个多模块 Maven java 项目。在父 pom 中: core batch-worker be scheduler migrations migr
我们正在尝试从 oauth2client 导入 AppAssertionCredentials。我们正在使用 python27 标准谷歌应用程序引擎。 我们的appengine_config.py如下
有什么区别mvn appengine:更新和Google App Engine 中的 mvn appengine:deploy。 最佳答案 这取决于您为项目使用的配置。 old AppEngine p
从语义上讲,api 和ext 指的是什么意思?例如,为什么 taskqueue 属于 api 而 db 属于 ext? 最佳答案 API = 应用程序编程接口(interface)。 所以我们通过它的
我是一名优秀的程序员,十分优秀!