When we training models with command line, we will get this traceback.
Traceback (most recent call last):
File "/home/gay17/anaconda3/envs/cellpose/bin/cellpose", line 8, in <module>
sys.exit(main())
File "/home/gay17/anaconda3/envs/cellpose/lib/python3.8/site-packages/cellpose/__main__.py", line 252, in main
output = io.load_train_test_data(args.dir, test_dir, imf, args.mask_filter,
File "/home/gay17/anaconda3/envs/cellpose/lib/python3.8/site-packages/cellpose/io.py", line 461, in load_train_test_data
images, labels, image_names = load_images_labels(train_dir, mask_filter,
File "/home/gay17/anaconda3/envs/cellpose/lib/python3.8/site-packages/cellpose/io.py", line 425, in load_images_labels
if os.path.isfile(label_names[n]) or os.path.isfile(flow_names[0]):
TypeError: 'NoneType' object is not subscriptable
We need to go to "/home/gay17/anaconda3/envs/cellpose/lib/python3.8/site-packages/cellpose/io.py", line 425,
replace
if os.path.isfile(label_names[n]) or os.path.isfile(flow_names[0]):
with
if os.path.isfile(label_names[n]) or (flow_names is not None and os.path.isfile(flow_names[0])):
Then the commond line works well.
When we training models with command line, we will get this traceback.
We need to go to "/home/gay17/anaconda3/envs/cellpose/lib/python3.8/site-packages/cellpose/io.py", line 425, replace
if os.path.isfile(label_names[n]) or os.path.isfile(flow_names[0]):
withif os.path.isfile(label_names[n]) or (flow_names is not None and os.path.isfile(flow_names[0])):
Then the commond line works well.