At my school we're making a tool that will allow a user to browse for a Houdini scene file, and then have all image maps in that
scene file converted to .rat files and re-pathed automatically. Unfortunately, Hython is having troubles with Tkinter. We are using Houdini version 16.5.405, windows 7 and python 2.7.5. Involved code is attached.
As our machines are re-imaged every four months we're trying to not add any environment variables to them.
Here is how it goes:
1. We run a batch file that calls our main line logic in Hython (convertToRat_mainLineLogic_batTest.bat)
2. Main line logic imports all scripts and runs functions from them (convertToRat_mainLineLogic.py)
3. Our file browser imports Tkinter (fileNameGet.py)
4. Tkinter attempts to import _tkinter and fails (Tkinter.py, from Houdini 16.5.405/python27/lib/lib-tk)
5. This error is received:
“N:\PROJECTS\pyClub\convertToRat>cmd /K ”CProgram Files/Side Effects Software/H
oudini 16.5.405/bin/hython2.7.exe“ convertToRat_mainLineLogic.py
Traceback (most recent call last):
File ”convertToRat_mainLineLogic.py“, line 8, in <module>
import fileNameGet
File ”N:\PROJECTS\pyClub\convertToRat\fileNameGet.py“, line 3, in <module>
from Tkinter import *
File ”C:\PROGRA~1\SIDEEF~1\HOUDIN~1.405\python27\lib\lib-tk\Tkinter.py", line
39, in <module>
import _tkinter # If this fails your Python may not be configured for Tk
ImportError: No module named _tkinter
We have attempted to put _tkinter in the houdini library ('…\Houdini 16.5.405\python27\libs) as it is currently missing but it had no effect.
Any help is appreciated, thanks!
Tkinter module cannot access _tkinter library (Hython)
795 0 1- Vanderbolt
- Member
- 5 posts
- Joined: May 2018
- Offline
-
- Quick Links