Zim

zim cgi won't run without gobject

Bug #525957 reported by Dan Connolly
2
Affects Status Importance Assigned to Milestone
Zim
Confirmed
Wishlist
Unassigned

Bug Description

To reproduce:

1. grab zim-0.44 sources, unpack
2. invoke zim.cgi
3. lose/crash/traceback as below

Is there any particular reason why the cgi script depends on gobject?

I'm going to see if I can remove this dependency.

$ ./zim.cgi
Traceback (most recent call last):
  File "./zim.cgi", line 30, in <module>
    from zim.config import data_dir
  File "/u/2/connolly/src/zim-0.44/zim/__init__.py", line 24, in <module>
    import gobject
ImportError: No module named gobject

Tags: www
Revision history for this message
Dan Connolly (connolly) wrote :

I should have made the description "zim.cgi won't run in pure-python environment". The way I first ran into this problem was when trying to access a notebook from a mac.

Revision history for this message
Dan Connolly (connolly) wrote :

I thought maybe WWWInterface didn't really need to depend on gobject,
so I tried this patch... I'll show the (failing) results in another attachment.

Revision history for this message
Dan Connolly (connolly) wrote :

This shows that WWWInterface seems to use gobject stuff such as .emit and .connect_after; I'm still not sure why, but I guess it's not as simple as I initially thought.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

I'm afraid zim will always need gobject, since it is used for event based code in all components (not only the gui parts). This is a design choice. Is there a problem with just installing gobject ?

Changed in zim:
status: New → Incomplete
Revision history for this message
Dan Connolly (connolly) wrote :

Mac OS comes with python, but it doesn't come with a C compiler. So pure-python stuff is *much* easier to deal with on a Mac. The other day I spent a couple hours trying to get the right version of the OS X developer tools installed on a machine that didn't have quite the latest Mac operating system.

So yes, there's a problem "just" installing gobject.

One of the things I like about Zim is that the storage format is reasonably simple text files that I should be able to manipulate with lots of ordinary tools. I figured I could develop my own pure-python web interface to the data. I thought zim.cgi would save me the effort, but if it depends on gobject, it doesn't quite meet my needs.

Changed in zim:
status: Incomplete → Fix Committed
status: Fix Committed → Incomplete
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

There is a point to be made that data backend should work without depending on glib, however this will be low priority action.

Please note that you can use mac ports to obtain a version of python and glib bindings precompiled. See the installation notes on the web page for details.

Changed in zim:
status: Incomplete → Confirmed
importance: Undecided → Wishlist
tags: added: redesign www
tags: removed: redesign
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.