Freenove / Freenove_4WD_Smart_Car_Kit_for_Raspberry_Pi

Apply to FNK0043
Other
133 stars 148 forks source link

Test.py says, 'File not found' when executing #6

Closed ghost closed 3 years ago

ghost commented 3 years ago

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.

DenzelChen commented 3 years ago

@EliR3210 Could you please contact us via support@freenove.com with pictures? We will figure it out.