Forums

win32 Only

I am trying to setup an established Django project I developed in Windows 11. When trying the makemigrations, I get an error that says import error: win32 only. It appears this error is generated from an import statement in my views.py that looks like: from .modelRoutines.fitparse import KCBFitParse I opened a python console and tried that statement, it appears the fitparse.py file is the offender. I got this from https://github.com/dtcooper/python-fitparse What makes it win32 only? If I change the text encoding of the .py files will it work?

We do not know what makes random Python projects only work on win32. That is something that you will need to check with the project. Changing the file encoding is unlikely to help.

Thanks -- there is another .fit parsing tool out there, I guess I may have to try it if I am to put this project on a Unix system!

If you want to check it locally you can use the WSL.

Thanks -- I tried WSL but if was a bit difficult to setup, so I went back to Oracle's Virtual Box. The library fitparse.py AND a different but still supported library, fitdecode.py, run fine in Ubuntu with no mention of 'win32 only'! Next step is to try to run the whole project now in the Virtual Box before trying again in pythonanywhere