Closed chris-hunter closed 1 year ago
Nice catch. It sounds familiar and was fixed in this Pull Request #45 Not sure where it got lost, but is an easy fix.
Thanks and yes, @gitotp is correct. This was fixed some time back, so not quite sure how it has regressed. I am currently abroad, but will have a look once I am back.
Thanks - I've made the changes to evogateway.py shown in Pull Request #45 and it works perfectly with the default config file.
@chris-hunter I've just merged the latest code into master. PR #45 should now be correctly incorporated.
Thanks. I've updated to the new master which works
Thank you for this excellent script. I am using evogateway v3 on Ubuntu 22.04 with python 3.10. When I try to run evogateway with the default config file values (except COM_PORT, and MQTT values), it fails with the following error: Traceback (most recent call last): File "/home/weasel/evoGateway/evogateway.py", line 184, in
file_handler = RotatingFileHandler(EVENTS_FILE, maxBytes=LOG_FILE_ROTATE_BYTES, backupCount=LOG_FILE_ROTATE_COUNT)
File "/usr/lib/python3.10/logging/handlers.py", line 151, in init
if maxBytes > 0:
TypeError: '>' not supported between instances of 'str' and 'int'
I can resolve this by commenting out the the LOG_FILE_ROTATE_COUNT and LOG_FILE_ROTATE_BYTES lines.
It seems that these values from the config file are being interpretted as strings rather than integers - is there a way I can resolve this without commenting out these lines?