Forum: Poser 12


Subject: Updated Python scripts ?

ThunderStone opened this issue on Jan 30, 2023 ยท 15 posts


Y-Phil posted Tue, 31 January 2023 at 3:42 PM

"ERROR: bad magic number in" means that you are trying to run a compiled Python script, often a .pyc, using the wrong Python version.
Poser12 uses Python 3.7 whereas Poser11 and previous versions are using Python2.7 scripts.
Same origin for the errror on the 'print' command: in Python3.x, print is not a command anymore but a function, thus needing to write if print("Hi!") for example.

"ERROR: DLL load failed": forget about dson with Poser12. You'll have to use Poser11 (dson uses Python2.x, and Daz refuses categorically to either update it or to let anybody update it).
Note that both Poser version can coexist on your system: install them in different folders. IN my case, Poser11 lies in "c:\program files\..." whereas Poser12 is launched from "p:\poser\poser12\..."

Something else you will have to check: often, in "Runtime\Python\addons", whatever the Poser version, you may find a list of modules that are automatically loaded when the said Poser version is launched.
In each subfolder of this "addons\", you may find a file named __init__.py or __init__.pyc
This will instruct Poser's Python to load them.
If Poser12 encounters such a folder that is for Python2.7, chances are that it won't load, resulting in one of the encountered errors.
The solution: either find an updated version or remove the sub-folder from there.
In my case, for example, I have one called OctaneRender and Poser12's default PythonShell.
Poser11: there's dson, EZMat, KinectCapture and Poser11's default PythonShell.

Start investigating in the folder where the executable lies. I'm writing as my installation has all the runtimes in a dedicated folder, on an SSD drive, and both Poser version have their runtimes collection in common.



๐’ซ๐’ฝ๐“Ž๐“


(ใฃโ—”โ—กโ—”)ใฃ

๐Ÿ‘ฟ Win11 on i9-13900K@5GHz, 64GB, RoG Strix B760F Gamng, Asus Tuf Gaming RTX 4070 OC Edition, 1 TB SSD, 6+4+8TB HD
๐Ÿ‘ฟ Mac Mini M2, Sequoia 15.2, 16GB, 500GB SSD
๐Ÿ‘ฟ Nas 10TB
๐Ÿ‘ฟ Poser 13 and soon 14 โค๏ธ