Help from Poser Snake-heads

  • I'm seriously peeved about the state of the Poser Python Shell. I don't intend to delve into the whys and wherefores of the Tkinter vs wx debate. I just want some reassurance that I'm not imagining that the stability and completeness of the Poser Python bundle has declined, rather than improved over the years. I don't mean recently introduced Poser features and addons that have yet to be exposed to Python, but functionality of the bundled packages and modules accessible from the Poser Python Shell.

    For instance, issues where a broken module could break the pydoc (help) functionality in Python 2.7 were resolved and patched in major Python releases as long ago as 2009. In the MacOS Poser Pro, the bundled Python 2.7.2 dated June 2011! will crash Poser if you issue the help() modules command!
    I have no problem with this under the MacOS bundled Python 2.7.13 IDLE environment.

    I really want to know, before I find I've wasted my time with a clean installation of Poser Pro 11, whether what I'm about to install is any less broken than what I have now!

    Could a few Windows and MacOS Poser Python users let me know what Python version they have bundled with their Poser installations and whether they are able to successfully list the modules installed. (In the Python Shell addon, enter help() at the >>> prompt and then enter modules at the help> prompt.) WARNING!!! Please don't do this with an unsaved scene open as it may crash Poser!

    This used to work back in Poser Pro 2010 (Poser 8) under the bundled Python 2.4.4. (And STILL DOES!)

    This all feels like my car has an engine mis-fire, and I've just found that the bonnet release cable is broken, so I can't check under the hood to see if there's a loose distributor cable and fix it, without having to sell the car for scrap and buy another second-hand clunker. </RANT>

  • In Poser, I can list the modules. However, the Windows cursor turns into an hourglass immediately after typing help(), so Something Bad is happening somewhere. Resource Monitor shows that Poser is keeping one CPU core 100% busy, and although the UI responds after a fashion, I can't exit without invoking Task Manager.

    Poser shows the same behaviour, at least on this brief test.

  • @englishbob thanks, can you tell me what your Python Shell versions are?

    Do you see PIL (package) in the list of modules? This used to be installed in a PythonExtensions folder along with wx back in Poser Pro 2010 (version 8) when Python 2.4 was bundled on MacOS, but looking through the python directories within Poser Pro 11, there seems to be no Python Image Library (PIL) at all. But, since I can't list modules from within Poser at all, I don't know how the rest of Postwork Manager works at all, which it obviously does if I'm trying to save as PNG.

  • Poser 10 reports Python 2.7.1 (r271:28925, Mar 6 2015, 16:06:09)
    Poser 11 reports Python 2.7.1 (r271:33735, Jan 6 2017, 04:28:45)

    Yes, PIL is in the list. I can post the whole thing if it helps.

  • One more thing: the behaviour I saw before was because I forgot to quit from the help prompt. If I do that, the shell appears to revert to normal, the busy cursor goes away, and I can close Poser gracefully.

  • Tested with Poser Pro on OS X 10.10.5.

    Python help() command works, modules are listed and PIL is part of the list.

    Reported Python version: 2.7.2 Jun 11 2011.

  • OK, I've just had to trawl through my old python scripts for the documentation I wrote on 15th Nov 2012 on how to install the SciPy package and a compatible NumPy to perform spline interpolation to attempt to determine parameter dial values based on keyed value operations prior to Poser implementing an UnaffectedValue() parameter method so I could save actual parameter dial values to the library, rather than the ERC or JCM influenced values.

    The place I had to look for bundled Python packages was in /Applications/Poser Pro 11/ (only relevant to MacOS), where I find PIL (which I've since discovered is Deprecated! and should be replaced with Pillow, a forked and currently supported version of the Python Imaging Libraries) and wx.

  • @englishbob & @nagra_00_ Thanks for your replies. I'm on MacOS Sierra 10.12.6. What do they say about the bleeding edge? Oh yes, it's always bleeding! And if it isn't, it won't be long before rigor mortis sets in.

    I suspect that one of my python modules is "broken" and that is what is crashing pydoc while trying to list modules. That isn't supposed to crash Poser, though.

    Repost from the other thread:

    ..., I have successfully persuaded Poser to use a more recent, external installation of Pillow, a supported fork of the now moribund PIL (Python Imaging Libraries) package.

    Having installed Pillow-4.2.1 via the terminal command 'pip install Pillow' and verified its presence as a package from the MacOS Python IDLE shell, I shutdown Poser and navigated to the location its Python extensions are installed, namely: /Applications/Poser 11/

    Once there, I renamed the 'PIL' folder to 'oldPIL' and duplicated the PIL.pth file to oldPIL.pth (can easily be done from a Finder window)

    From the terminal window (and this needs to be done here, not in the Finder), I created a soft-link from the newly installed Pillow to Poser's site-packages with the command:
    ln -s /usr/local/lib/python2.7/site-packages/PIL
    This needs to be a soft link, rather than a finder alias, as python and shell scripts generally don't know how to traverse Finder aliases, but do work with soft links.

    The final step to replace PIL was to insert the path /usr/local/lib/python2.7/site-packages/PIL into the existing PIL.pth file (which previously contained just 'PIL', pointing to the local Poser bundled PIL folder).

    With that out of the way, I could re-launch Poser and finally get back to troubleshooting the Shaderworks' Postwork Manager script. Unfortunately, it didn't just work, but threw up an error relating to a deprecated method tostring() which has been replaced with a method tobytes() in the latest Pillow (PIL) release. However, simply replacing every occurrence of tostring with tobytes (there were only 3 within the first 25 lines of the script) in '/Applications/Poser 11/Runtime/Python/poserScripts/ScriptsMenu/Partners/ShaderWorks/Postwork' (after making a backup copy) restores Postwork Manager's ability to save JPEG images on MacOS.

  • I do seem to be able to list a subset of modules before the Python Shell help() crashes back to the >>> shell prompt. E.g. If I enter 'modules os', I get :

    help> modules os

    Here is a list of matching modules. Enter any module name to get more help.

    posix - This module provides access to operating system functionality that is
    Postwork Manager Debug
    Postwork Manager
    wx.gizmos - Various gizmo classes: DynamicSashWindow, EditableListBox,
    wx.lib.activex - This module provides a wx.Window that hosts ActiveX Controls using
    wx.lib.agw.buttonpanel - A custom panel class with gradient background shading with the possibility to
    wx.lib.agw.genericmessagedialog - This class is a possible, fancy replacement for wx.MessageDialog.
    wx.lib.agw.hypertreelist - HyperTreeList is a class that mimics the behaviour of wx.gizmos.TreeListCtrl, with
    wx.lib.agw.multidirdialog - This class represents a possible replacement for wx.DirDialog, with the additional
    wx.lib.agw.peakmeter - PeakMeterCtrl mimics the behaviour of equalizers that are usually found in stereos
    wx.lib.agw.toasterbox - ToasterBox is a cross-platform widget to make the creation of MSN style "toaster"
    wx.lib.colourchooser - PyColourChooser
    wx.lib.colourchooser.canvas - PyColourChooser
    wx.lib.colourchooser.intl - PyColourChooser
    wx.lib.colourchooser.pycolourbox - PyColourChooser
    wx.lib.colourchooser.pycolourchooser - PyColourChooser
    wx.lib.colourchooser.pycolourslider - PyColourChooser
    wx.lib.colourchooser.pypalette - PyColourChooser
    Traceback (most recent call last):
    File "<input>", line 1, in <module>
    File "/Applications/Poser 11/", line 467, in call
    return*args, **kwds)
    File "/Applications/Poser 11/", line 1730, in call
    File "/Applications/Poser 11/", line 1748, in interact
    File "/Applications/Poser 11/", line 1768, in help
    File "/Applications/Poser 11/", line 1873, in listmodules
    File "/Applications/Poser 11/", line 1973, in apropos
    ModuleScanner().run(callback, key)
    File "/Applications/Poser 11/", line 1938, in run
    for importer, modname, ispkg in pkgutil.walk_packages(onerror=onerror):
    File "/Applications/Poser 11/", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
    File "/Applications/Poser 11/", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
    File "/Applications/Poser 11/", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
    File "/Applications/Poser 11/", line 125, in walk_packages
    for item in walk_packages(path, name+'.', onerror):
    File "/Applications/Poser 11/", line 110, in walk_packages
    File "/Applications/Poser 11/", line 16, in <module>
    raise RuntimeError(msg)
    RuntimeError: Should not import this directly, used by pubsub.core if applicable

    Would you both mind posting your modules output, so I can compare which one might be the ultimate culprit and replace/repair it?


  • This is mine, from Poser 11 on WIndows:

    Please wait a moment while I gather a list of all available modules...

    BaseHTTPServer abc idlelib setLightStyle
    Bastion addReflect ihooks sets
    CGIHTTPServer addRefract imageop sgmllib
    Canvas addSubSScater imaplib sha
    ConfigParser aifc imghdr shadowCatcher
    Cookie antigravity imp shelve
    Dialog anydbm importlib shlex
    DocXMLRPCServer argparse imputil shutil
    FileDialog array inspect signal
    FixTk ast io site
    HTMLParser asynchat itertools smtpd
    IBL asyncore json smtplib
    KinectCapture atexit keyword sndhdr
    MimeWriter audiodev lib2to3 socket
    PIL audioop lightAO sqlite3
    PythonShell base64 linecache sre
    Queue bdb locale sre_compile
    ReGUID binascii logging sre_constants
    ReGeometryExporter binhex macpath sre_parse
    ReMaterial bisect macurl2path ssl
    ReTools bsddb mailbox stat
    Reality bz2 mailcap statvfs
    Reality_services cPickle mainButtons string
    ScrolledText cProfile mainWacros stringold
    SimpleDialog cStringIO mainWacrosDebut stringprep
    SimpleHTTPServer calendar markupbase strop
    SimpleXMLRPCServer cgi marshal struct
    SocketServer cgitb math subprocess
    StringIO chunk md5 sunau
    Tix clearButtons mhlib sunaudio
    Tkconstants cmath mimetools symbol
    Tkdnd cmd mimetypes symtable
    Tkinter code mimify sys
    UserDict codecs mmap sysconfig
    UserList codeop modulefinder tabnanny
    UserString collections msilib tarfile
    _LWPCookieJar colorsys msvcrt telnetlib
    _MozillaCookieJar commands multifile tempfile
    builtin compileall multiprocessing textwrap
    future compiler mutex this
    _abcoll contextlib netrc thread
    _ast cookielib new threading
    _bisect copy nntplib time
    _bsddb copy_reg nt timeit
    _codecs createAtmosphere ntpath tkColorChooser
    _codecs_cn csv nturl2path tkCommonDialog
    _codecs_hk ctypes numbers tkFileDialog
    _codecs_iso2022 curses numpy tkFont
    _codecs_jp datetime opcode tkMessageBox
    _codecs_kr dbhash operator tkSimpleDialog
    _codecs_tw decimal optparse toaiff
    _collections deleteRes os token
    _csv difflib os2emxpath tokenize
    _ctypes dircache parser toonShade
    _ctypes_test dis pdb trace
    _elementtree distutils pickle traceback
    _functools doctest pickletools ttk
    _hashlib documentation pipes tty
    _heapq dumbdbm pkgutil turtle
    _hotshot dummy_thread platform txtToHtml
    _imaging dummy_threading plistlib types
    _io email popen2 unicodedata
    _json encodings poplib unittest
    _locale errno poserEdit urllib
    _lsprof exceptions poserStartup urllib2
    _md5 filecmp poseraddon urlparse
    _msi fileinput posixfile user
    _multibytecodec fnmatch posixpath uu
    _multiprocessing formatter pprint uuid
    _pyio fpformat profile warnings
    _random fractions pstats wave
    _sha ftplib pty weakref
    _sha256 functools py_compile webbrowser
    _sha512 future_builtins pyclbr whichdb
    _socket gc pydoc winsound
    _sqlite3 genericpath pydoc_data wsgiref
    _sre getopt pyexpat wx
    _ssl getpass quopri wxversion
    _strptime gettext random xdrlib
    _struct glob re xml
    _subprocess gzip removeOrphans xmllib
    _symtable hack repr xmlrpclib
    _testcapi hashlib rexec xxsubtype
    _threading_local heapq rfc822 zipfile
    _tkinter hmac rlcompleter zipimport
    _warnings hotshot robotparser zlib
    _weakref htmlentitydefs runpy
    _weakrefset htmllib sched
    _winreg httplib select

  • @anomalaus For 'modules os' my list looks exactly like yours except that Postwork Manager Debug and Postwork Manager are not part of my list.