Bay 12 Games Forum

Please login or register.

Login with username, password and session length
Advanced search  

Author Topic: Help with Companion/Python?  (Read 893 times)

Brian

  • Bay Watcher
    • View Profile
Help with Companion/Python?
« on: July 12, 2008, 12:52:59 pm »

I want to get Dwarf Companion working from Python so I can try my own scripts.  Unfortunately this is the output I get trying to run dwarf companion:

Code: [Select]
dfcompanion_prototype.py
Traceback (most recent call last):
  File "C:\Documents and Settings\Administrator\Desktop\640x300ez_38c3\companion\dfcompanion_prototype.py", line 3, in <module>
    import gtk
  File "C:\Program Files (x86)\PyGTK\Python\Lib\site-packages\gtk-2.0\gtk\__init__.py", line 38, in <module>
    import gobject as _gobject
  File "C:\Program Files (x86)\PyGTK\Python\lib\site-packages\gtk-2.0\gobject\__init__.py", line 30, in <module>
    from gobject.constants import *
  File "C:\Program Files (x86)\PyGTK\Python\lib\site-packages\gtk-2.0\gobject\constants.py", line 22, in <module>
    from _gobject import type_from_name
ImportError: DLL load failed: The specified procedure could not be found.

Difficulty: AMD 64.  So first I went through all the components following the instructions here.  I selected the correct packages for my system.  Apparently selecting the 64-bit packages when available was actually wrong.  I uninstalled everything and went with the 32-bit packages and I got the error above.  Then I uninstalled everything and tried the all-in-one installer here and got the exact same result.


I'm actually not a Python programmer yet, but I have a dozen languages under my belt and I thought Dwarf Fortress would provide me some good Python time.  Can anyone help me out?

Thanks
Logged

Deon

  • Bay Watcher
  • 💀 💀 💀 💀 💀
    • View Profile
Re: Help with Companion/Python?
« Reply #1 on: July 12, 2008, 03:20:40 pm »

But exactly which DLL?
This maybe something with pathing... Try to run python with the -v argument, so you can see where all your imports are resolved.
There should be some missing (unfound?) procedure in _gobject.pyd.

Also there's already a Dwarf Companion thread, you'd better ask there.
« Last Edit: July 12, 2008, 03:24:39 pm by Deon »
Logged
▬(ஜ۩۞۩ஜ)▬
✫ DF Wanderer ✫ - the adventure mode crafting and tweaks
✫ Cartographer's Lounge ✫ - a custom worldgen repository