简体   繁体   English

Google App Engine-ImportError:没有名为edf的模块

[英]Google App Engine - ImportError: No module named edf

I have several .py files in my Google App Engine project and I decided to group them together in a directory. 我的Google App Engine项目中有几个.py文件,因此决定将它们分组到一个目录中。 However when I tried to access one I get an error: 但是,当我尝试访问一个时,出现错误:

ImportError: No module named edf ImportError:没有名为edf的模块

Previously my directory structure was: 以前,我的目录结构是:

app_name
-edf.py
-jkl.py

Now it is 现在它是

app_name
-folder_name
--edf.py
--jkl.py

I tried to change the app.yaml line 我试图更改app.yaml行

- url: /edf
  script: folder_name/edf

You should use the dot character '.' 您应该使用点字符“。”。 to separate the paths rather than the colon in your original example. 分隔路径而不是原始示例中的冒号。

On some operating systems \\ is used to separate paths, and in some / is used. 在某些操作系统上,\\用于分隔路径,而在某些操作系统上,则用于/。 So python uses . 所以python使用。 instead to be os-independent at that level. 而是在该级别独立于操作系统。

You can read some discussion on this here: https://www.python.org/dev/peps/pep-0328/ 您可以在这里阅读有关此内容的一些讨论: https : //www.python.org/dev/peps/pep-0328/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

相关问题 ImportError:谷歌应用引擎中没有名为****的模块错误 - ImportError: No module named **** Error in google app engine ImportError:在Google App Engine上没有名为flask的模块 - ImportError: No module named flask on google app engine Google App Engine ImportError:未命名模块 - Google App Engine ImportError: No module named 谷歌应用引擎中的“导入错误:没有名为装饰器的模块” - 'ImportError: No module named decorator' in google app engine Google App Engine中用于SendGrid的“ ImportError:没有名为smtpapi的模块” - “ImportError: No module named smtpapi” for SendGrid in Google App Engine 导入错误:没有名为 _ctypes 的模块。 带有散景图的 Google 应用引擎 - ImportError: No module named _ctypes. Google app engine with bokeh plot Google App Engine启动器(Python)-ImportError:没有名为webapp2的模块 - Google App Engine Launcher (Python) - ImportError: No module named webapp2 Python ImportError:Google app引擎项目中没有名为main的模块 - Python ImportError: No module named main in Google app engine project importError:没有名为Coreapp的模块(Flask和Google App Engine) - importError: No module named Coreapp (Flask and Google App Engine) Google App Engine:导入错误:没有名为 pkg_resources 的模块 - Google App Engine: ImportError: No module named pkg_resources
 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM