emjelde / rstats

Read rstats backup file for Tomato firmware
Apache License 2.0
11 stars 6 forks source link

struct.error: unpack requires a string argument of length 4 #1

Open alexmagereanu opened 7 years ago

alexmagereanu commented 7 years ago

"struct.error: unpack requires a string argument of length 4" when trying to read the stats created by an asus ac-rt88u with merlin's firmware. any idea? (line 47 in load_history method)

apassiou commented 2 years ago

Are you running this program with Python2.7? Python 3.x changed the way unpack struct works and will give that error. Someone needs to port this to python3.x since python 2 is a relic at this point. As workaround use this project it supports Python3 - https://github.com/VREMSoftwareDevelopment/rstats-cstats

emjelde commented 2 years ago

Thanks for the suggestion and workaround!

I'm no longer using Tomato and I'd need to find an old backup to test the changes so it's not really a priority for me at the moment. I do welcome pull requests!