Home > other >  Open and read txt file from USB
Open and read txt file from USB

Time:10-03

I'm using Linux. I know my USB name is:

Bus 001 Device 005: ID 8564:1000 Transcend Information, Inc. JetFlash

and the idVendor and idProduct is:

idVendor           0x8564 Transcend Information, Inc.   
idProduct          0x1000 JetFlash

Where is the problem? Code or other stuff missing?

I read over the the output from linux command (usb.core.USBError: [Errno 13] Access denied )

  • tried with 'sudo python The_one_i_want.py'

tried with sudo python The_one_i_want.py

the output is

sudo: python:找不到指令
sudo: python: command not found

I just checked my sudo is working:
sudo is working

the output after I tried , sudo python The_one_i_want.pynow the output shows

python: can't open file '/home/joy/fe_dir/The_one_i_want.py': [Errno 2] No such file or directory can't open file

but file The_one_I_want (new).py The_one_I_want.py is inside /fe_dir directory tough

updated tried: now is 'ModuleNotFoundError: No module named 'usb'' , how to solved from here?
ModuleNotFoundError: No module named 'usb'

CodePudding user response:

Simply run with sudo

sudo python The_one_i_want.py

Because the error you got says that you don't have permission to do that.

  • Related