When I try to execute the test program with sudo python test.py, it says: FileNotFoundError: [Errno 2] No such file or directory. It doesn't make sense, because all the files are there in the same place, but it can't find them. Full error code below:
Traceback (most recent call last): File "test.py", line 47, in <module> from Ultrasonic import * File "/home/Eli/Desktop/picar/Code/Server/Ultrasonic.py", line 2, in <module> from Motor import * File "/home/Eli/Desktop/picar/Code/Server/Motor.py", line 79, in <module> PWM=Motor() File "/home/Eli/Desktop/picar/Code/Server/Motor.py", line 5, in __init__ self.pwm = PCA9685(0x40, debug=True) File "/home/Eli/Desktop/picar/Code/Server/PCA9685.py", line 29, in __init__ self.bus = smbus.SMBus(1) FileNotFoundError: [Errno 2] No such file or directory
Are there any solutions? If there are, please let me know.
When I try to execute the test program with
sudo python test.py
, it says:FileNotFoundError: [Errno 2] No such file or directory
. It doesn't make sense, because all the files are there in the same place, but it can't find them. Full error code below:Traceback (most recent call last): File "test.py", line 47, in <module> from Ultrasonic import * File "/home/Eli/Desktop/picar/Code/Server/Ultrasonic.py", line 2, in <module> from Motor import * File "/home/Eli/Desktop/picar/Code/Server/Motor.py", line 79, in <module> PWM=Motor() File "/home/Eli/Desktop/picar/Code/Server/Motor.py", line 5, in __init__ self.pwm = PCA9685(0x40, debug=True) File "/home/Eli/Desktop/picar/Code/Server/PCA9685.py", line 29, in __init__ self.bus = smbus.SMBus(1) FileNotFoundError: [Errno 2] No such file or directory
Are there any solutions? If there are, please let me know.