idefix
(idefix)
1
Hi
I’m trying to run the following python code (python 2.0.1)
from Tkinter import *
root = Tk()
but I get the following error in the console (of BlenderPublisher 2.25):
Traceback (most recent call last):
File "Text", line 2, in ?
File "C:\Python20\Lib\lib-tk\Tkinter.py", line 1478, in __init__
baseName = os.path.basename(sys.argv[0])
AttributeError: argv
What can I do?
Renzo
saluk
(saluk)
2
Try importing sys, but that doesn’t seem right either.
I’m not sure.
jms
(jms)
3
And if you import “sys” first, and “Blender” after?
There is a submodule sys in Blender without “arg”
attribute …
jm
idefix
(idefix)
4
Thanks for your answers!
I could solve it by just assigning some dummy value to sys.argv.
Thanks again
Renzo