[英]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.