-
Notifications
You must be signed in to change notification settings - Fork 792
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
TypeError: expected str, bytes or os.PathLike object, not NoneType #188
Comments
2 possibilities of error The data-set you have, does it contain sbd data as well ? |
@pvbhanuteja thank you ! |
@li0128 - how did you solve the problem? I am getting a similar error:
My config file:
I downloaded the dataset from: I am using the pretrained model shared here |
@mvcaro Do you solve the problem? I am getting a similar error. |
I got the same issue; pascal_voc_loader can get the sbd_path keyword indeed, in the Readme it is mentioned we can provide <dataset_keyarg1>: in the config file. But I do not see where in the training script these additional key:value arguments are provided to the data_loader I suggest a correction in https://github.com/jeremyfix/pytorch-semseg/blob/753ec6847b9921c1318797838e1ec11d5afd88c4/train.py#L41 |
@mvcaro @wackxu @jeremyfix |
@mvcaro Do you solve the problem? I am getting a similar error. |
dear i'm getting the same error. i don't have sbd data set the folder is bIank. I am running this code on windows 10. i don't know how to define correct path. runfile('F:/Reasearch/Codes/pytorch-segnet/train.py', wdir='F:/Reasearch/Codes/pytorch-segnet') File "", line 1, in File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 786, in runfile File "C:\ProgramData\Anaconda3\lib\site-packages\spyder_kernels\customize\spydercustomize.py", line 110, in execfile File "F:/Reasearch/Codes/pytorch-segnet/train.py", line 229, in File "F:/Reasearch/Codes/pytorch-segnet/train.py", line 49, in train File "F:\Reasearch\Codes\pytorch-segnet\ptsemseg\loader\pascal_voc_loader.py", line 73, in init File "F:\Reasearch\Codes\pytorch-segnet\ptsemseg\loader\pascal_voc_loader.py", line 199, in setup_annotations File "C:\ProgramData\Anaconda3\lib\ntpath.py", line 76, in join TypeError: expected str, bytes or os.PathLike object, not NoneType |
what can I do if I do not add sbd_path? |
RUNDIR: runs/fcn8s_pascal/68527
Traceback (most recent call last):
File "train.py", line 229, in
train(cfg, writer, logger)
File "train.py", line 49, in train
augmentations=data_aug,
File "/home/lxc/PythonProjects/pytorch-semseg-master/ptsemseg/loader/pascal_voc_loader.py", line 73, in init
self.setup_annotations()
File "/home/lxc/PythonProjects/pytorch-semseg-master/ptsemseg/loader/pascal_voc_loader.py", line 199, in setup_annotations
path = pjoin(sbd_path, "dataset/train.txt")
File "/home/lxc/anaconda3/lib/python3.7/posixpath.py", line 80, in join
a = os.fspath(a)
TypeError: expected str, bytes or os.PathLike object, not NoneType
The text was updated successfully, but these errors were encountered: