zim-wiki team mailing list archive
-
zim-wiki team
-
Mailing list archive
-
Message #00336
Re: [Fwd: Re: Pyzim alpha 2 released]
Sorry, I think the output below isn't detailed enough.
I put __init_.py into pdb debugger mode.
Here's the output:
-> def add_submodule(self, name, importname):
(Pdb) r
--Return--
> /Users/jliu/gtk/inst/lib/python2.5/site-packages/gtk-2.0/gtk/_lazyutils.py(51)<module>()->None
-> class LazyNamespace(ModuleType):
(Pdb)
> /Users/jliu/gtk/inst/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py(45)<module>()
-> from gtk.deprecation import _Deprecated, _DeprecatedConstant
(Pdb)
--Return--
> /Users/jliu/gtk/inst/lib/python2.5/site-packages/gtk-2.0/gtk/__init__.py(127)<module>()->None
-> set_interactive(1)
(Pdb) > /Users/jliu/gtk/inst/lib/python2.5/site-packages/zim/gui/__init__.py(16)<module>()
-> import gtk.keysyms
(Pdb)
--Return--
> /Users/jliu/gtk/inst/lib/python2.5/site-packages/zim/gui/__init__.py(2005)<module>()->None
-> gobject.type_register(ProgressBarDialog)
(Pdb)
> /Users/jliu/gtk/inst/lib/python2.5/site-packages/zim/__init__.py(195)main()
-> handler = zim.gui.GtkInterface(*args, **optsdict)
(Pdb)
--Return--
> /Users/jliu/gtk/inst/lib/python2.5/site-packages/zim/__init__.py(195)main()->None
-> handler = zim.gui.GtkInterface(*args, **optsdict)
(Pdb)
AttributeError: "'NoneType' object has no attribute 'path'"
> /Users/jliu/gtk/inst/bin/zim(17)<module>()
-> zim.main(sys.argv)
(Pdb) s
> /Users/jliu/gtk/inst/bin/zim(18)<module>()
-> except zim.GetoptError, err:
(Pdb)
> /Users/jliu/gtk/inst/bin/zim(21)<module>()
-> except zim.UsageError, err:
(Pdb)
> /Users/jliu/gtk/inst/bin/zim(24)<module>()
-> except KeyboardInterrupt: # e.g. <Ctrl>C while --server
(Pdb)
--Return--
> /Users/jliu/gtk/inst/bin/zim(24)<module>()->None
-> except KeyboardInterrupt: # e.g. <Ctrl>C while --server
(Pdb)
Traceback (most recent call last):
File "/Users/jliu/gtk/inst/bin/zim", line 17, in <module>
zim.main(sys.argv)
File "/Users/jliu/gtk/inst/lib/python2.5/site-packages/zim/__init__.py",
line 195, in main
handler = zim.gui.GtkInterface(*args, **optsdict)
File "/Users/jliu/gtk/inst/lib/python2.5/site-packages/zim/gui/__init__.py",
line 189, in __init__
icon = data_file('zim.png').path
AttributeError: 'NoneType' object has no attribute 'path'
> -> zim.main(sys.argv)
> (Pdb) l
> 14 sys.exit(1)
> 15
> 16
> 17 try:
> 18 pdb.set_trace()
> 19 -> zim.main(sys.argv)
> 20 except zim.GetoptError, err:
> 21 print >>sys.stderr, sys.argv[0]+':', err
> 22 sys.exit(1)
> 23 except zim.UsageError, err:
> 24 print >>sys.stderr, zim.usagehelp.replace('zim', sys.argv[0])
> (Pdb) q
> Traceback (most recent call last):
> File "./pyzim", line 19, in <module>
> zim.main(sys.argv)
> File "/Users/jliu/gtk/inst/lib/python2.5/bdb.py", line 54, in trace_dispatch
> return self.dispatch_exception(frame, arg)
> File "/Users/jliu/gtk/inst/lib/python2.5/bdb.py", line 92, in
> dispatch_exception
> if self.quitting: raise BdbQuit
> bdb.BdbQuit
>
>
>
>
> ln-liquidnets-macbook-pro-3:~ jliu$ gtk/inst/bin/zim
> Traceback (most recent call last):
> File "gtk/inst/bin/zim", line 17, in <module>
> zim.main(sys.argv)
> File "/Users/jliu/gtk/inst/lib/python2.5/site-packages/zim/__init__.py",
> line 192, in main
> handler = zim.gui.GtkInterface(*args, **optsdict)
> File "/Users/jliu/gtk/inst/lib/python2.5/site-packages/zim/gui/__init__.py",
> line 189, in __init__
> icon = data_file('zim.png').path
> AttributeError: 'NoneType' object has no attribute 'path'
>
>
> On Sat, Jul 18, 2009 at 11:38 AM, Jeffrey Liu<jliu@xxxxxxxxxxx> wrote:
>> FYI - running from the source worked.
>> (python zim.py)
>>
>>
>>
>> On Sat, Jul 18, 2009 at 11:08 AM, Jeffrey Liu<jliu@xxxxxxxxxxx> wrote:
>>> I ran from the zim install (after python setup.py install).
>>> I tried setting the XDG_DATA_DIRS environment variable and re-running,
>>> but I'm still getting the same error. (With the gtk-osx build from
>>> source, the zim.png and other files are located at
>>> ~/gtk/inst/share/zim)
>>>
>>>
>>> ls gtk/inst/share/zim
>>> applications globe_banner_small.png pixmaps
>>> templates
>>> globe.svg manual preferences.conf zim.png
>>> globe_banner.svg menubar.xml style.conf zim.svg
>>>
>>>
>>> There are wiki pages at gtk-osx talking about how to package your
>>> program for Mac OS X, and I can give that a try.
>>>
>>> Thanks,
>>> Jeff
>>>
>>>
>>>
>>> On Sat, Jul 18, 2009 at 4:08 AM, Jaap
>>> Karssenberg<jaap.karssenberg@xxxxxxxxx> wrote:
>>>> ... forgot to CC the mailing list
>>>>
>>>> Jeffrey Liu wrote:
>>>>>
>>>>> However, I ran into two things when running pyzim.
>>>>> 1. The version check fails even though I'm running python 2.5.2.
>>>>>
>>>>
>>>> Oops, typo on my side - code 2.6 in that version check instead of 2.5 as
>>>> intended.
>>>>
>>>>> 2. After removing the version check, pyzim would attempt to run, but
>>>>> I see the following error:
>>>>> Traceback (most recent call last):
>>>>> File "/Users/jliu/gtk/inst/bin/zim-test", line 8, in <module>
>>>>> zim.main(sys.argv)
>>>>> File "/Users/jliu/gtk/inst/lib/python2.5/site-packages/zim/__init__.py",
>>>>> line 192, in main
>>>>> handler = zim.gui.GtkInterface(*args, **optsdict)
>>>>> File
>>>>> "/Users/jliu/gtk/inst/lib/python2.5/site-packages/zim/gui/__init__.py",
>>>>> line 189, in __init__
>>>>> icon = data_file('zim.png').path
>>>>> AttributeError: 'NoneType' object has no attribute 'path'
>>>>>
>>>>
>>>> This means it can not find the data files. Will add a check for that.
>>>> Are you running from the source directory or did you install already?
>>>> In this later case you need to check where the data files were installed
>>>> (e.g. /usr/local/share/zim) and set the XDG_DATA_DIRS environment
>>>> variable to point to that location.
>>>>
>>>>> Sorry, I wish I knew more python to help debug these two issues.
>>>>>
>>>>
>>>> No problem. I'm really interested to hear your results trying to run on OS
>>>> X. Ideally would like to have some procedure how to compile a binary package
>>>> for OS X.
>>>>
>>>> Cheers!
>>>>
>>>> Jaap
>>>>
>>>>
>>>>
>>>
>>
>
References