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

log error saying permission denied #20

Open
KPM0612 opened this issue Apr 23, 2019 · 2 comments
Open

log error saying permission denied #20

KPM0612 opened this issue Apr 23, 2019 · 2 comments

Comments

@KPM0612
Copy link

KPM0612 commented Apr 23, 2019

Hi, while running python /baby_cry_detection/pc_main/train_set.py, received the following errors

  1. 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

  1. 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'
@KPM0612
Copy link
Author

KPM0612 commented Apr 24, 2019

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

@giulbia
Copy link
Owner

giulbia commented Aug 4, 2019

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 distfolder 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.

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