baby_cry_detection
baby_cry_detection copied to clipboard
log error saying permission denied
Hi, while running python /baby_cry_detection/pc_main/train_set.py, received the following errors
- File "baby_cry_detection/pc_main/train_set.py", line 10, in
from baby_cry_detection.pc_methods import Reader ModuleNotFoundError: No module named 'baby_cry_detection'
So, I brought train_set.py outside baby_cry_detection folder and typed python train_set.py
Then I received the following error
- File "train_set.py", line 84, in
main() File "train_set.py", line 34, in main level=logging.INFO) File "/home/user/anaconda3/lib/python3.7/logging/init.py", line 1900, in basicConfig h = FileHandler(filename, mode) File "/home/user/anaconda3/lib/python3.7/logging/init.py", line 1092, in init StreamHandler.init(self, self._open()) File "/home/user/anaconda3/lib/python3.7/logging/init.py", line 1121, in _open return open(self.baseFilename, self.mode, encoding=self.encoding) PermissionError: [Errno 13] Permission denied: '/home/logs_pc_methods_feat_eng.log'
Hi, I solved the above issue and ran the application on my PC. In order to port it on raspberry pi, I downloaded the docker and pulled the babycry detection raspbpi version. It is asking for egg file to be copied to the lib folder. Where will I find my app's egg file generated by the baby-cry-detection folder in PC
Hi,
Very sorry for the late reply, I hope my answer is still usefull.
Once your code works, and I guess it does as you have the model trained, you need to package your code. To do so, from the parent folder execute python setup.py bdist_egg
. You should find three new folders in the project:
- baby_cry_detection.egg-info
- build
- dist
The egg file you need to transfer to your Raspberry Pi is in the dist
folder and it's called baby_cry_detection-1.1-py2.7.egg
.
Please note that the docker file has changed, I updated the code, make sure you pull it again. Also, the new docker uses librosa 0.7.0. Your model should be fine but please pull https://github.com/giulbia/baby_cry_detection again before creating the egg file.