joenano / rpscrape

Scrape horse racing results data and racecards.
143 stars 59 forks source link

Getting: File must be opened in binary mode #101

Closed pnorms closed 2 years ago

pnorms commented 2 years ago

I am attempting to run this for the first time, admittedly on a new Python environment running on Windows 11. I have checked file permissions, the settings files are there and readable by the running user.

Traceback (most recent call last): File "C:\Scripts\rpscrape\scripts\rpscrape.py", line 20, in settings = Settings() File "C:\Scripts\rpscrape\scripts\utils\settings.py", line 7, in init self.toml = self.load_toml() File "C:\Scripts\rpscrape\scripts\utils\settings.py", line 37, in load_toml toml = self.parse_toml(settings_file) File "C:\Scripts\rpscrape\scripts\utils\settings.py", line 48, in parse_toml return tomli.load(settings_file) File "C:\Users\whoever\AppData\Local\Packages\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\LocalCache\local-packages\Python310\site-packages\tomli_parser.py", line 63, in load raise TypeError( TypeError: File must be opened in binary mode, e.g. use open('foo.toml', 'rb')