[英]I am getting error message ImportError: cannot import name 'onetime_file'" while import a python file
我正在尝试从配置文件夹导入 onetime_file 但收到错误消息“导入错误:无法导入名称‘onetime_file’”
sorry i can not comment the post yet.抱歉,我还不能评论该帖子。 How did you tried to open the file?
你是如何尝试打开文件的? The standard way is:
标准方法是:
with open(PATH_FILE, 'r') as file:
Did you check the path was correct?您检查路径是否正确? Did you tried to put the absolute path instead of the relative one?
您是否尝试放置绝对路径而不是相对路径? Is your file writable or readable?
您的文件是否可写或可读?
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.