A
A
a2020-05-29 00:10:10
Python
a, 2020-05-29 00:10:10

How to fix access error?

I put the script on ubuntu and got an error

PermissionError: [Errno 13] Permission denied: 'users.json'


The error got out because of threading.
It works locally, how can I fix it?

All error
Traceback (most recent call last):
  File "/usr/lib/python3.6/threading.py", line 916, in _bootstrap_inner
    self.run()
  File "bot.py", line 1346, in run
    with open("users.json", "w") as f:
PermissionError: [Errno 13] Permission denied: 'users.json'

Answer the question

In order to leave comments, you need to log in

2 answer(s)
S
soremix, 2020-05-29
@SoreMix

What rights? Isn't the error due to multi-threaded access to the file?

O
Official account of the Timeweb team, 2020-06-01
@timeweb_team

check file permissions

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question