Thu, Jan 9, 4:18 PM CST

Renderosity Forums / Poser Python Scripting



Welcome to the Poser Python Scripting Forum

Forum Moderators: Staff

Poser Python Scripting F.A.Q (Last Updated: 2024 Dec 02 3:16 pm)

We now have a ProPack Section in the Poser FreeStuff.
Check out the new Poser Python Wish List thread. If you have an idea for a script, jot it down and maybe someone can write it. If you're looking to write a script, check out this thread for useful suggestions.

Also, check out the official Python site for interpreters, sample code, applications, cool links and debuggers. This is THE central site for Python.

You can now attach text files to your posts to pass around scripts. Just attach the script as a txt file like you would a jpg or gif. Since the forum will use a random name for the file in the link, you should give instructions on what the file name should be and where to install it. Its a good idea to usually put that info right in the script file as well.

Checkout the Renderosity MarketPlace - Your source for digital art content!



Subject: Tk problem in Windows 7


EnglishBob ( ) posted Tue, 10 December 2013 at 4:51 AM · edited Thu, 09 January 2025 at 3:58 PM

My set-up is a bit unusual, so bear with me. I run Poser 7 from a USB disk; it isn't fully portable, but as long as I populate my AppData with the right stuff it's worked fine on four different XP installations, and on Windows 7 Professional 64 bit at work.

I recently had to replace the hard disk in my laptop, so I decided to finally install the Windows 7 upgrade. ;) This is Win7 Pro 32 bit, by the way.

However on this installation only, Python scripts that use Tk fail. Non-Tk scripts seem to be fine, as far as I've seen; and as I say, all scripts are fine on my other Windows 7 machine.

Somehow, I can't seem to find where I saved my screenshot of the error message; but I'll post this anyway in the hope that someone will recognise the problem. I'll add the screen shot once I get back home.

Any ideas welcome in the meantime.


EnglishBob ( ) posted Tue, 10 December 2013 at 5:56 AM · edited Tue, 10 December 2013 at 5:57 AM

Here's a line from the error message, that I found by searching for similar problems:

Quote - import _tkinter # If this fails your Python may not be configured for Tk

I found reference to this on the DAZ forums - but that referred to a Mac. I'm reasonably sure my PC hasn't turned into a Mac. :)

Searching for that error on the Wider World Web reveals much advice about fixing one's Python installation - but my scripts still work fine on another machine. :S I checked in case I had broken something last night...


timarender ( ) posted Tue, 10 December 2013 at 8:34 AM

Whilst perhaps of little use, the readme file with PP2014 includes this sentence:

"PoserPython scripts can make use of Tkinter to provide a GUI. Poser Pro 2014 ships with Tkinter 8.5. Scripts that were written for an earlier version of Tkinter might require adjustment. Please contact the author of your script for details. We are currently unable to support Tkinter 8.5 in 64-bit environments on the Mac."

I also see the quoted error message appears in the code (line 39) on my 64bit 2014Pro file in: "C:Program FilesSmith MicroPoser Pro 2014RuntimePythonLiblib-tkTkinter.py". But it's meaning is beyond my understanding.


EnglishBob ( ) posted Tue, 10 December 2013 at 12:43 PM

file_500073.png

Here's an example error report. This one is generated by Dimension3D's Copy Material script, but any script that tries to use tkinter fails at the same place, line 38 in Tkinter.py.

I wonder if this is a 32 bit / 64 bit related problem? That's the only material difference between my two Windows 7 environments, and looking at Tkinter.py, it checks for a 32 bit system and if found, imports FixTk. I'm trying to understand what's going on in there. :)  


EnglishBob ( ) posted Wed, 11 December 2013 at 6:47 AM · edited Wed, 11 December 2013 at 6:49 AM

I got it fixed. A DLL had somehow mysteriously moved itself out of the Poser directory; Win 7 32 bit didn't warn me that it couldn't find the file, and Win 7 64 bit must have had a copy elsewhere.

Not really Python related at all, then. Thanks to ockham for pointing me in the right direction, and thanks also to timarender for contributing. Sorry I didn't acknowledge your post earlier.  


Privacy Notice

This site uses cookies to deliver the best experience. Our own cookies make user accounts and other features possible. Third-party cookies are used to display relevant ads and to analyze how Renderosity is used. By using our site, you acknowledge that you have read and understood our Terms of Service, including our Cookie Policy and our Privacy Policy.