What does this mean? :- error writing oppa.py: Permission denied

This Error message means that you have not given sufficient permissions for it to work.
To fix this error, you can try the following:

  • Check if the file is open in another program. [If it is, close the file and try running the Python code again ]
  • [Ensure that you are specifying the path to a file instead of a directory
  • [Run your Python script with the necessary permissions ]
    I hope this helps!

Thank you @begmohdmohsin for your reply, but it still didn’t work

Hi @govardhinihomeneedsp

Try using Replit code editor. This will automatically install all the necessary libraries when you run the code. Make sure that the bolt API and device id mentioned are correct.

If you still face any issues, please feel free to get back to us

Hey @govardhinihomeneedsp,

I noticed the issue you’re encountering. It seems you’re running this on a Virtual Linux machine. In such cases, you must ensure your user has appropriate permissions.

Try executing the following commands:

sudo chmod u+rw oppa.py
sudo nano oppa.py

If you still face any issues, please feel free to visit us.

Hi there,
To save or run a python script in a linux command line, you would need sufficient permissions and admin privileges in certain cases. You can look at the post: ‘[Error writing /filename: Permission denied]’ while trying to save a file using the nano editor
Check your read-write permissions using ls -l <filename.py>.
Then use chmod to give read, write and execute permissions.
A useful resource to manage permissions is as follows: How to manage linux file permissions
Also, kindly don’t share your Bolt API keys publicly on a forum. You can always regenerate new one if you believe it has become public.

hey I recommend you check out this forum, they have discussed about this forum, hope this helps

Thanks for the information!