Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

AttributeError: 'NoneType' object has no attribute 'startswith' #156

Open
jun214384468 opened this issue Dec 1, 2019 · 2 comments
Open

Comments

@jun214384468
Copy link

File "/home/yan/disk/All_python_Text/pixel_link-master/train_pixel_link.py", line 97, in config_initialization
config.print_config(FLAGS, dataset)
File "/home/yan/disk/All_python_Text/pixel_link-master/None/config.py", line 205, in print_config
do_print(None)
File "/home/yan/disk/All_python_Text/pixel_link-master/None/config.py", line 186, in do_print
print_ckpt(flags.checkpoint_path)
File "/home/yan/disk/All_python_Text/pixel_link-master/None/config.py", line 179, in print_ckpt
ckpt = util.tf.get_latest_ckpt(path)
File "/home/yan/disk/All_python_Text/pixel_link-master/pylib/src/util/tf.py", line 51, in get_latest_ckpt
path = util.io.get_absolute_path(path)
File "/home/yan/disk/All_python_Text/pixel_link-master/pylib/src/util/io_.py", line 80, in get_absolute_path
if p.startswith('~'):
AttributeError: 'NoneType' object has no attribute 'startswith'

@Lanme
Copy link

Lanme commented Dec 4, 2019

do you set train_dir?

@jun214384468
Copy link
Author

是的,我给train_dir路径了
不过这个问题是因为我给的路径是~/yan/....开头的,他会把~识别然后转换成绝对路径/home/yan
所以我就直接给了绝对路径,完美的绕过了那个错误

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants