简体   繁体   中英

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?

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM