← Back to team overview

zim-wiki team mailing list archive

Re: Zim failing to open notebooks on samba share

 

Yes, that works.  Is there a way to default Zim to use shared or launch it
in "shared" mode from the command line?


On Mon, May 12, 2014 at 5:46 AM, Jaap Karssenberg <
jaap.karssenberg@xxxxxxxxx> wrote:

> Looks like there is an issue with running the SQLite index off a share
> drive. You can fix this by setting the notebook property "shared". If
> running local go to the menu "File" --> "properties" and check the checkbox
> for shared notebook.
>
> Alternative edit the config file "notebook.zim" in the notebook folder and
> add the line "shared=True".
>
> Regards,
>
> Jaap
>
>
>
>  On Fri, May 9, 2014 at 9:27 AM, Wayne Sherman <
> wayne@xxxxxxxxxxxxxxxxxxxxx> wrote:
>
>>  I am trying out Zim 0.60 on Kubuntu 14.04 (installed from default
>> Ubuntu repo).  It appears to work correctly with notebooks on my local
>> filesystem.  But, when I try to create or open a notebook from my samba
>> share, it fails:
>>
>> *~/mounts/public/tmp/zim_note$ zim -D notebook.zim*
>>
>> INFO: This is zim 0.60
>> DEBUG: Python version is sys.version_info(major=2, minor=7, micro=6,
>> releaselevel='final', serial=0)
>> DEBUG: Platform is posix
>> DEBUG: Zim revision is:
>>   branch: pyzim-trunk
>>   revision: 672 jaap.karssenberg@xxxxxxxxx-20130430172720-n6jaw95wiyevdqln
>>   date: 2013-04-30 19:27:20 +0200
>> DEBUG: Not running from a source dir
>> DEBUG: Set XDG_DATA_HOME to /home/wsherman/.local/share
>> DEBUG: Set XDG_DATA_DIRS to [<Dir: /usr/share/xubuntu>, <Dir:
>> /usr/share/xfce4>, <Dir: /usr/local/share>, <Dir: /usr/share>, <Dir:
>> /usr/share>]
>> DEBUG: Set XDG_CONFIG_HOME to /home/wsherman/.config
>> DEBUG: Set XDG_CONFIG_DIRS to [<Dir: /etc/xdg/xdg-xubuntu>, <Dir:
>> /usr/share/upstart/xdg>, <Dir: /etc/xdg>, <Dir: /etc/xdg>]
>> DEBUG: Set XDG_CACHE_HOME to /home/wsherman/.cache
>> DEBUG: Running command: gui
>> DEBUG: Loading config from: /home/wsherman/Documents/zim_note/notebook.zim
>> DEBUG: Loading config from: /home/wsherman/zim_note/notebook.zim
>> DEBUG: Loading config from: /home/wsherman/test/notebook.zim
>> DEBUG: Wrote /home/wsherman/.config/zim/notebooks.list
>> DEBUG: Remote call from 20200: <RemoteMethodCall: 20200:
>> zim.ipc.Server(None).ping((), {})>
>> DEBUG: Starting server by spawning new process
>> INFO: Spawning: ['/usr/bin/python', '/usr/bin/zim', '--ipc-server-main',
>> '/tmp/zim-wsherman/zim-server-socket', '10'] (cwd: None)
>> DEBUG: Process started with PID: 20202
>> DEBUG: Remote call from 20200: <RemoteMethodCall: 20200:
>> zim.ipc.Server(None).ping((), {})>
>> DEBUG: Remote call from 20200: <RemoteMethodCall: 20200:
>> zim.ipc.Server(None).ping((), {})>
>> DEBUG: Remote call returned to 20200: ('ACK', 20202)
>> DEBUG: Remote call from 20200: <RemoteMethodCall: 20200:
>> zim.ipc.Server(None).has_object((<RemoteObject:
>> zim.gui.GtkInterface(file:///home/wsherman/mounts/public/tmp/zim_note)>,),
>> {})>
>> DEBUG: Remote call returned to 20200: False
>> DEBUG: Remote call from 20200: <RemoteMethodCall: 20200:
>> zim.ipc.Server(None).init_object((<RemoteObject:
>> zim.gui.GtkInterface(file:///home/wsherman/mounts/public/tmp/zim_note)>,),
>> {})>
>> DEBUG: Remote call returned to 20200: True
>> DEBUG: Remote call from 20200: <RemoteMethodCall: 20200:
>> zim.gui.GtkInterface(file:///home/wsherman/mounts/public/tmp/zim_note).present((None,),
>> {})>
>> DEBUG: Remote call returned to 20200: No such object: <RemoteObject:
>> zim.gui.GtkInterface(file:///home/wsherman/mounts/public/tmp/zim_note)>
>> Traceback (most recent call last):
>>   File "/usr/bin/zim", line 74, in <module>
>>     zim.main(argv)
>>   File "/usr/lib/python2.7/dist-packages/zim/__init__.py", line 446, in
>> main
>>     gui.present(page, **optsdict)
>>   File "/usr/lib/python2.7/dist-packages/zim/ipc.py", line 756, in call
>>     raise re
>> ValueError: No such object: <RemoteObject:
>> zim.gui.GtkInterface(file:///home/wsherman/mounts/public/tmp/zim_note)>
>>
>> *from file: /tmp/zim-deamon.log *
>>
>> INFO: Server starting 20202 at /tmp/zim-wsherman/zim-server-socket
>> DEBUG: Loading config from: <ConfigFile:
>> /home/wsherman/.config/zim/preferences.conf>
>> DEBUG: Gtk version is (2, 24, 23)
>> DEBUG: Pygtk version is (2, 24, 0)
>> DEBUG: Loading config from: <ConfigFile:
>> /home/wsherman/.config/zim/style.conf>
>> DEBUG: Opening notebook: file:///home/wsherman/mounts/public/tmp/zim_note
>> DEBUG: Wrote <UnixFile:
>> /home/wsherman/mounts/public/tmp/zim_note/.zim/tmp>
>> INFO: Remove file: <UnixFile:
>> /home/wsherman/mounts/public/tmp/zim_note/.zim/tmp>
>> DEBUG: Loading config from: <UnixFile:
>> /home/wsherman/mounts/public/tmp/zim_note/notebook.zim>
>> DEBUG: Cache dir: <Dir: /home/wsherman/mounts/public/tmp/zim_note/.zim>
>> DEBUG: Index database file: <UnixFile:
>> /home/wsherman/mounts/public/tmp/zim_note/.zim/index.db>
>> INFO: Flushing index
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.7/dist-packages/zim/index.py", line 529, in
>> do_initialize_db
>>     self.db.executescript(SQL_CREATE_TABLES)
>> sqlite3.OperationalError: database is locked
>> DEBUG: Child process started 20204 for no such table: pages
>> ERROR: Exception while setting up child process
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.7/dist-packages/zim/ipc.py", line 621, in
>> childmain
>>     obj = klass(id, *arg, **kwarg)
>>   File "/usr/lib/python2.7/dist-packages/zim/gui/__init__.py", line 460,
>> in __init__
>>     self.open_notebook(notebook)
>>   File "/usr/lib/python2.7/dist-packages/zim/gui/__init__.py", line 1093,
>> in open_notebook
>>     page = NotebookInterface.open_notebook(self, notebook)
>>   File "/usr/lib/python2.7/dist-packages/zim/__init__.py", line 760, in
>> open_notebook
>>     nb = get_notebook(nb)
>>   File "/usr/lib/python2.7/dist-packages/zim/notebook.py", line 514, in
>> get_notebook
>>     return Notebook(dir=path)
>>   File "/usr/lib/python2.7/dist-packages/zim/notebook.py", line 794, in
>> __init__
>>     self.index = zim.index.Index(notebook=self)
>>   File "/usr/lib/python2.7/dist-packages/zim/index.py", line 472, in
>> __init__
>>     self.set_notebook(notebook)
>>   File "/usr/lib/python2.7/dist-packages/zim/index.py", line 490, in
>> set_notebook
>>     self._connect()
>>   File "/usr/lib/python2.7/dist-packages/zim/index.py", line 524, in
>> _connect
>>     self._flush()
>>   File "/usr/lib/python2.7/dist-packages/zim/index.py", line 562, in
>> _flush
>>     cursor.execute('insert into pages(basename, sortkey, parent,
>> hascontent, haschildren) values (?, ?, ?, ?, ?)', ('', '', 0, False, False))
>> OperationalError: no such table: pages
>> DEBUG: Child process 20204 quit
>> DEBUG: Known objects: [OperationalError('no such table: pages',)]
>>
>>
>> or if I call it in "standalone" mode it also fails:
>>
>> *~/mounts/public/tmp/zim_note$ zim -D --standalone notebook.zim*
>>
>> INFO: This is zim 0.60
>> DEBUG: Python version is sys.version_info(major=2, minor=7, micro=6,
>> releaselevel='final', serial=0)
>> DEBUG: Platform is posix
>> DEBUG: Zim revision is:
>>   branch: pyzim-trunk
>>   revision: 672 jaap.karssenberg@xxxxxxxxx-20130430172720-n6jaw95wiyevdqln
>>   date: 2013-04-30 19:27:20 +0200
>> DEBUG: Not running from a source dir
>> DEBUG: Set XDG_DATA_HOME to /home/wsherman/.local/share
>> DEBUG: Set XDG_DATA_DIRS to [<Dir: /usr/share/xubuntu>, <Dir:
>> /usr/share/xfce4>, <Dir: /usr/local/share>, <Dir: /usr/share>, <Dir:
>> /usr/share>]
>> DEBUG: Set XDG_CONFIG_HOME to /home/wsherman/.config
>> DEBUG: Set XDG_CONFIG_DIRS to [<Dir: /etc/xdg/xdg-xubuntu>, <Dir:
>> /usr/share/upstart/xdg>, <Dir: /etc/xdg>, <Dir: /etc/xdg>]
>> DEBUG: Set XDG_CACHE_HOME to /home/wsherman/.cache
>> DEBUG: Running command: gui
>> DEBUG: Loading config from: /home/wsherman/Documents/zim_note/notebook.zim
>> DEBUG: Loading config from: /home/wsherman/zim_note/notebook.zim
>> DEBUG: Loading config from: /home/wsherman/test/notebook.zim
>> DEBUG: Wrote /home/wsherman/.config/zim/notebooks.list
>> DEBUG: Loading config from: <ConfigFile:
>> /home/wsherman/.config/zim/preferences.conf>
>> DEBUG: Gtk version is (2, 24, 23)
>> DEBUG: Pygtk version is (2, 24, 0)
>> DEBUG: Loading config from: <ConfigFile:
>> /home/wsherman/.config/zim/style.conf>
>> DEBUG: Opening notebook: /home/wsherman/mounts/public/tmp/zim_note
>> DEBUG: Wrote /home/wsherman/mounts/public/tmp/zim_note/.zim/tmp
>> INFO: Remove file: /home/wsherman/mounts/public/tmp/zim_note/.zim/tmp
>> DEBUG: Loading config from:
>> /home/wsherman/mounts/public/tmp/zim_note/notebook.zim
>> DEBUG: Cache dir: /home/wsherman/mounts/public/tmp/zim_note/.zim
>> DEBUG: Index database file:
>> /home/wsherman/mounts/public/tmp/zim_note/.zim/index.db
>> INFO: Flushing index
>> Traceback (most recent call last):
>>   File "/usr/lib/python2.7/dist-packages/zim/index.py", line 529, in
>> do_initialize_db
>>     self.db.executescript(SQL_CREATE_TABLES)
>> sqlite3.OperationalError: database is locked
>> Traceback (most recent call last):
>>   File "/usr/bin/zim", line 74, in <module>
>>     zim.main(argv)
>>   File "/usr/lib/python2.7/dist-packages/zim/__init__.py", line 433, in
>> main
>>     handler = zim.gui.GtkInterface(notebook, page, **optsdict)
>>   File "/usr/lib/python2.7/dist-packages/zim/gui/__init__.py", line 460,
>> in __init__
>>     self.open_notebook(notebook)
>>   File "/usr/lib/python2.7/dist-packages/zim/gui/__init__.py", line 1093,
>> in open_notebook
>>     page = NotebookInterface.open_notebook(self, notebook)
>>   File "/usr/lib/python2.7/dist-packages/zim/__init__.py", line 760, in
>> open_notebook
>>     nb = get_notebook(nb)
>>   File "/usr/lib/python2.7/dist-packages/zim/notebook.py", line 514, in
>> get_notebook
>>     return Notebook(dir=path)
>>   File "/usr/lib/python2.7/dist-packages/zim/notebook.py", line 794, in
>> __init__
>>     self.index = zim.index.Index(notebook=self)
>>   File "/usr/lib/python2.7/dist-packages/zim/index.py", line 472, in
>> __init__
>>     self.set_notebook(notebook)
>>   File "/usr/lib/python2.7/dist-packages/zim/index.py", line 490, in
>> set_notebook
>>     self._connect()
>>   File "/usr/lib/python2.7/dist-packages/zim/index.py", line 524, in
>> _connect
>>     self._flush()
>>   File "/usr/lib/python2.7/dist-packages/zim/index.py", line 562, in
>> _flush
>>     cursor.execute('insert into pages(basename, sortkey, parent,
>> hascontent, haschildren) values (?, ?, ?, ?, ?)', ('', '', 0, False, False))
>> sqlite3.OperationalError: no such table: pages
>>
>> Between tests, I made sure there were no instances of Zim running and no
>> sockets left over in /tmp.  Any help would be appreciated.
>>
>> Thanks,
>>
>> Wayne
>>
>> _______________________________________________
>> Mailing list: https://launchpad.net/~zim-wiki
>> Post to     : zim-wiki@xxxxxxxxxxxxxxxxxxx
>> Unsubscribe : https://launchpad.net/~zim-wiki
>> More help   : https://help.launchpad.net/ListHelp
>>
>>
>

Follow ups

References