Ah yes, Code: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files (x86)\\Steam\\steamapps\\common\\rFactor 2\\Userdata\\player\\controller.json' I thought I’d trapped that, anyway you can specify it in headlightControls.ini.
You need to specify where your controller.json is stored. Open headlightControls.ini and add controller_file = E:/Steam/steamapps/common/rFactor 2/UserData/player/controller.json under [miscellaneous].
I've made a change to trap that and give a warning but the script to pack it up into an .exe has stopped working again
Thank you, but unfortunately that does not help either. Script error still appears. So is the error in the new exe file?
Please download the debug version of the exe from the same location, it may give more information. I haven’t uploaded a new version yet, I can’t build it.
thanks for your help,seven. hmmmm , how can I attach a file here? https://www.file-upload.net/download-13769581/rpt.txt.html
Same error Code: FileNotFoundError: [Errno 2] No such file or directory: 'C:\\Program Files (x86)\\Steam\\steamapps\\common\\rFactor 2\\Userdata\\player\\controller.json' Where is your rFactor installed? What controller_file entry do you have in headlightControls.ini?
1. D:/Zusatz/Steam/steamapps/common/rfactor 2/ 2. controller_file = D:/Zusatz/Steam/steamapps/common/rfactor 2/UserData/player/controller.json
OK, that looks fine. I've fixed the problem creating an .exe and there are a pair of new V0.7.61 .exes with an error trap if the program can't open controller.ini. The DEBUG version also prints extra clues.
Thank you very much for your help and effort. addendum: Hey, Seven it works perfectly again! Thanks for your great Job and fantastic Tool...
Does it need to be a keyboard key or can the lights in rF2 also be mapped to a wheel button (instead of H) and will this work?
It has to be a keyboard button because I haven't found a way to send wheel buttons to a game. I don't see this as a shortcoming, you can map wheel buttons to operate rF2headlights - there are controls for On, Off and Toggle as well as Flash.
Maintenance release (no code change) V0.7.64 uploaded to https://github.com/TonyWhitley/rF2headlights/releases using updated pyinstaller to overcome its vulnerability GHSA-7fcj-pq9j-wh2r (if you want details: https://pyinstaller.readthedocs.io/en/v3.6/CHANGES.html) My other Python programs will have the same update.
Hi there. Useful tool to have, however I can't get the "Select Flash Headlights" option to work. It will automatically flash in the pitlane, however does not accept the command for a manual flash. Any ideas on what I can look at or change?