热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Eclipse中的GAE拒绝访问-AccessisdeniedinGAEinEclipse

WhenItrytocallModel.put()inEclipseforaGooglePythonapp,Igetthefollowingerror:当我尝试在E

When I try to call Model.put() in Eclipse for a Google Python app, I get the following error:

当我尝试在Eclipse中为Google Python应用程序调用Model.put()时,出现以下错误:

exception value:[Error 5] Access is denied

I don't know if it's related, but this happened after I changed the parameter of --datastore_path="F:/tmp/myapp_datastore" in arguments of debug configurations.

我不知道它是否相关,但这发生在我在调试配置的参数中更改了--datastore_path =“F:/ tmp / myapp_datastore”的参数之后。

Everything is working fine for another application from the command prompt. However, when I use the same in Eclipse I get following dump in the console window of Eclipse:

从命令提示符处,其他应用程序的一切正常。但是,当我在Eclipse中使用相同的东西时,我会在Eclipse的控制台窗口中进行以下转储:

ERROR    2009-06-11 10:19:41,312 dev_appserver.py:2906] Exception 
encountered handling request 
Traceback (most recent call last): 
  File "F:\Program Files\Google\google_appengine\google\appengine\tools 
\dev_appserver.py", line 2876, in _HandleRequest 
    base_env_dict=env_dict) 
  File "F:\Program Files\Google\google_appengine\google\appengine\tools 
\dev_appserver.py", line 387, in Dispatch 
    base_env_dict=base_env_dict) 
  File "F:\Program Files\Google\google_appengine\google\appengine\tools 
\dev_appserver.py", line 2163, in Dispatch 
    self._module_dict) 
  File "F:\Program Files\Google\google_appengine\google\appengine\tools 
\dev_appserver.py", line 2081, in ExecuteCGI 
    reset_modules = exec_script(handler_path, cgi_path, hook) 
  File "F:\Program Files\Google\google_appengine\google\appengine\tools 
\dev_appserver.py", line 1979, in ExecuteOrImportScript 
    script_module.main() 
  File "F:\eclipse\workspace\checkthis\src\carpoolkaro.py", line 749, 
in main 
    run_wsgi_app(application) 
  File "F:\Program Files\Google\google_appengine\google\appengine\ext 
\webapp\util.py", line 76, in run_wsgi_app 
    result = application(env, _start_response) 
  File "F:\Program Files\Google\google_appengine\google\appengine\ext 
\webapp\__init__.py", line 517, in __call__ 
    handler.handle_exception(e, self.__debug) 
  File "F:\Program Files\Google\google_appengine\google\appengine\ext 
\webapp\__init__.py", line 384, in handle_exception 
    self.error(500) 
TypeError: 'str' object is not callable 
INFO     2009-06-11 10:19:41,312 dev_appserver.py:2935] "POST /suggest 
HTTP/1.1" 500 - 

This is the screen dump of the application from a browser window:

这是来自浏览器窗口的应用程序的屏幕转储:

 F:\Program Files\Google\google_appengine\google\appengine\ext\webapp 
\__init__.py in handle_exception(self=<__main__.SuggestHandler object 
at 0x019C0510>, exception=WindowsError(5, 'Access is denied'), 
debug_mode=True)

2 个解决方案

#1


According to this error,

根据这个错误,

TypeError: 'str' object is not callable 

I guess, you have shadowed built-in object str to something else.

我想,你已经将内置对象str遮住了其他东西。

For example, you used str="dummy" in your code and str became uncallable object.

例如,您在代码中使用了str =“dummy”,而str成为了不可调用的对象。

#2


Error 5 generally means the path you specified is wrong. I recommend you to remove the double quotation marks in your command:

错误5通常表示您指定的路径错误。我建议你删除命令中的双引号:

Try:

--datastore_path=F:/tmp/myapp_datastore

and let us know if that helped you

如果有帮助,请告诉我们


推荐阅读
author-avatar
jianji
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有