Closed yusufkurt77 closed 7 months ago
Generally you don't run the physics module, you run robot.py... which works for me? Can you provide the full command you executed, the full error message, and the full stack trace?
I run "py -3 robot.py sim" command on terminal. There is robot.py code i tried to run. Full error: 12:32:56:406 INFO : wpilib : WPILib version 2023.4.3.0 12:32:56:407 INFO : wpilib : HAL version 2023.4.3.0 12:32:56:407 INFO : wpilib : Running with simulated HAL. 12:32:56:407 INFO : wpilib : pyntcore version 2023.4.3.0 12:32:56:408 INFO : wpilib : robotpy-apriltag version 2023.4.3.0 12:32:56:408 INFO : wpilib : robotpy-commands-v2 version 2023.4.3.0 12:32:56:408 INFO : wpilib : robotpy-cscore version 2023.4.3.0 12:32:56:408 INFO : wpilib : robotpy-halsim-gui version 2023.4.3.0 12:32:56:408 INFO : wpilib : robotpy-wpimath version 2023.4.3.0 12:32:56:408 INFO : wpilib : robotpy-wpinet version 2023.4.3.0 12:32:56:409 INFO : wpilib : robotpy-wpiutil version 2023.4.3.0 12:32:56:409 INFO : wpilib : robotpy-photonvision version 2023.4.2 12:32:56:409 INFO : wpilib : robotpy-pathplannerlib version 2023.3.4.1 12:32:56:409 INFO : wpilib : robotpy-rev version 2023.1.3.2 12:32:56:409 INFO : wpilib : robotpy-ctre version 2023.1.0 12:32:56:409 INFO : wpilib : robotpy-playingwithfusion version 2023.1.0 12:32:56:409 INFO : wpilib : robotpy-navx version 2023.0.3 12:32:56:412 INFO : halsim_gui : WPILib HAL Simulation 2023.4.3.0 HAL Extensions: Attempting to load: halsim_gui Simulator GUI Initializing. Simulator GUI Initialized! HAL Extensions: Successfully loaded extension 12:32:56:575 ERROR : pyfrc.physics : User physics module does not have a PhysicsEngine object
That example definitely works, it seems like maybe the contents of the example have been corrupted on your machine? Have you opened physics.py
to verify that the contents are identical to the example?
Please provide a SHA1 hash of the files (robot.py and physics.py) on your machine so we can verify that they are not corrupted. On Windows, you can do this via certutil -hashfile FILENAME
.
robot.py hashfile: 22e201b092a1686e64f378896be62e1c841ad669 physics.py hashfile: 07ccfe9ae322c8f5fd205188297b785bc7732f67
These are the full code.
The robot.py code doesn't match the example you provided, and I get different hashes:
$ sha1sum *
4997d11b0a3e58248ac93e08b9175cfff7a5637b physics.py
88b6b7f176291bf1071877e0159b883d7085182a robot.py
But with that said, the code you provided looks correct, so there must be something really weird going on here -- maybe a newline thing, or a odd unicode character somewhere?
Can I ask you to directly download the example from https://github.com/robotpy/examples/archive/refs/heads/main.zip, and then try to run that?
I dont know what causes problem exactly but when i tried again this time it worked.
Glad to hear it!
Problem description
when i tried to run this code i encountered with "User physics module does not have a PhysicsEngine object" error.
Operating System
Windows
Installed Python Packages
Reproducible example code