Getting Error: TypeError: join() argument must be str or bytes, not 'NoneType'
yostpmtg opened this issue · comments
I followed your instruction on training and added 2 images in example_experiment (1 of brad pitt and 1 of lenna soderberg). I also hard coded the full directory paths within example_experiment.py in case there was a problem there.
Here is my error:
python3 experiments/example_experiment.py
2019-03-09 11:32:15,174:INFO: GOING TO PROCESS 4 images out of 4
2019-03-09 11:32:15.216302: I tensorflow/core/platform/cpu_feature_guard.cc:141] Your CPU supports instructions that this TensorFlow binary was not compiled to use: AVX2 FMA
expected str, bytes or os.PathLike object, not NoneType
multiprocessing.pool.RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/lib/python3.6/multiprocessing/pool.py", line 119, in worker
result = (True, func(*args, **kwds))
File "/usr/lib/python3.6/multiprocessing/pool.py", line 44, in mapstar
return list(map(*args))
File "/media/r/edata1/code/nns/face_det/celeb-detection-oss/ve-cdoss/lib/python3.6/site-packages/celebrity_detection_model_train-1.0.0-py3.6.egg/model_training/preprocessors/datasets_builder.py", line 119, in process_images_batch
gpu_memory_fraction=(1 / builder.pool_size)
File "/media/r/edata1/code/nns/face_det/celeb-detection-oss/ve-cdoss/lib/python3.6/site-packages/celebrity_detection_model_train-1.0.0-py3.6.egg/model_training/preprocessors/face_detection/face_detector.py", line 49, in __init__
data_dir, 'face_detection'
File "/media/r/edata1/code/nns/face_det/celeb-detection-oss/ve-cdoss/lib/python3.6/posixpath.py", line 99, in join
genericpath._check_arg_types('join', a, *p)
File "/media/r/edata1/code/nns/face_det/celeb-detection-oss/ve-cdoss/lib/python3.6/genericpath.py", line 149, in _check_arg_types
(funcname, s.__class__.__name__)) from None
TypeError: join() argument must be str or bytes, not 'NoneType'
"""
The above exception was the direct cause of the following exception:
Traceback (most recent call last):
File "experiments/example_experiment.py", line 57, in <module>
datasets_builder.perform()
File "/media/r/edata1/code/nns/face_det/celeb-detection-oss/ve-cdoss/lib/python3.6/site-packages/celebrity_detection_model_train-1.0.0-py3.6.egg/model_training/preprocessors/datasets_builder.py", line 62, in perform
self._process_images(train_images, self.train_dataset_path)
File "/media/r/edata1/code/nns/face_det/celeb-detection-oss/ve-cdoss/lib/python3.6/site-packages/celebrity_detection_model_train-1.0.0-py3.6.egg/model_training/preprocessors/datasets_builder.py", line 85, in _process_images
p.map(self.process_images_batch, process_params)
File "/usr/lib/python3.6/multiprocessing/pool.py", line 288, in map
return self._map_async(func, iterable, mapstar, chunksize).get()
File "/usr/lib/python3.6/multiprocessing/pool.py", line 670, in get
raise self._value
TypeError: join() argument must be str or bytes, not 'NoneType'
Any ideas?
looking at the stack trace you've provided my first assumption is that you don't have WORKDIR
env variable declared in your .env
file (the code crashes in datasets_builder
here: https://github.com/Giphy/celeb-detection-oss/blob/master/model_training/preprocessors/datasets_builder.py#L116)
just wondering have you created .env
file in the root dir as described in README
?