SebKuzminsky / pycam

Other
340 stars 98 forks source link

NameError: name 'gtk' is not defined #143

Closed flurl closed 5 years ago

flurl commented 5 years ago

I downloaded PyCAM v0.6.3 and installed the requirements. When running scripts/pycam I get the following error:

$ ./scripts/pycam 
Enabled 16 parallel local processes

(pycam:11237): GLib-GIO-CRITICAL **: 11:30:39.541: g_dbus_proxy_new: assertion 'G_IS_DBUS_CONNECTION (connection)' failed

(pycam:11237): GLib-GIO-CRITICAL **: 11:30:39.541: g_dbus_proxy_new: assertion 'G_IS_DBUS_CONNECTION (connection)' failed
Traceback (most recent call last):
  File "./scripts/pycam", line 723, in <module>
    exit_code = execute(parser, opts, args, pycam)
  File "./scripts/pycam", line 303, in execute
    result = show_gui(inputfile, opts.config_file)
  File "./scripts/pycam", line 145, in show_gui
    plugin_manager.import_plugins()
  File "/home/flurl/bin/pycam-0.6.3/pycam/Plugins/__init__.py", line 239, in import_plugins
    mod = imp.load_module(full_mod_name, mod_file, mod_filename, mod_desc)
  File "/home/flurl/bin/pycam-0.6.3/pycam/Plugins/OpenGLWindow.py", line 60, in <module>
    BUTTON_ROTATE = gtk.gdk.BUTTON1_MASK
NameError: name 'gtk' is not defined

After adding import gtk to pycam/Plugins/OpenGLWindow.py it works.

sumpfralle commented 5 years ago

Thank you for pointing this out! I fixed the issue in 13fb8525ffd177cc9d3428d943323217a3f74a22 and released v0.6.4.