0

I can get Snap7 working on Linux but not on Windows using Pycharm. I get:

WindowsError: [Error 193] %1 is not a valid Win32 application.

I have tried Python 32 and 64 bit version using all combinations of the snap7.dll, the ones in the archives Win32 and Win64. I'm using Windows7 64-bit Professional. What's going on?

Nico Haase
  • 11,420
  • 35
  • 43
  • 69
M.Mazur
  • 1
  • 2

1 Answers1

0

I have been working on a Linux system also with Snap7 for the past few months, to come over to Windows to also receive this issue. Only reason I haven't noticed this sooner is because I have been using the ClientDemo in the Snap7 Package.

I have tried the following:

  • Going back to older versions of Python (e.g. 2.7 where the documentation says its compatible)
  • un-installing and installing the packages (Both Python and Snap7)

There is only one thing I can clearly think of, and that it is the OS. Not sure if its all flavors of Windows 7 however. The documentation for the installation also states:

"Python-snap7 is developer for snap7 1.1.0 and Python2.7. It is tested on Windows (8.1 64 bit) and Linux, but it may work on other operating systems. Python 2.6 and Python 3+ may work, but are not fully tested yet."

Link: https://python-snap7.readthedocs.io/en/latest/introduction.html

So perhaps by chance, we are just unfortunate and that it does not work with this specific OS?