← Back to team overview

zim-wiki team mailing list archive

Re: start page for zim

 

This problem is deeper than I expected and has to do with the state/cache: on_close_page ... self.save_uistate(). Here is my `notebook.zim`:

```
[Notebook]
disable_trash=False
document_root=
endofline=unix
home=Home
icon=
interwiki=jp
name=plan
profile=
shared=False
```

Whether shared is True or False, it keeps state in `$HOME/.cache` directory:

```
DEBUG: Running from a source dir: /Users/reagle/bin/zim-0.68
DEBUG: Set XDG_DATA_HOME to /Users/reagle/.local/share
DEBUG: Set XDG_DATA_DIRS to [<Dir: /usr/share>, <Dir: /usr/local/share>]
DEBUG: Set XDG_CONFIG_HOME to /Users/reagle/.config
DEBUG: Set XDG_CONFIG_DIRS to [<Dir: /etc/xdg>]
DEBUG: Set XDG_CACHE_HOME to /Users/reagle/.cache
```

There, I deleted `notebook-Users_reagle_joseph_plan_zim/`. And hurray, I now start on the home page, but still the path state is never retained. After I browse a bunch of pages and quit, the state is:

```
[History]
list=[["Home",0,null]]
recent=[["Home",0,null]]
current=0
```

Also (and I suspect this is the crux) as I browse the pages I get these errors:

```
DEBUG: BackgroundCheck finished
Traceback (most recent call last):
  File "/Users/reagle/bin/zim-0.68/zim/gui/__init__.py", line 2411, in on_close_page
    self.save_uistate()
  File "/Users/reagle/bin/zim-0.68/zim/gui/__init__.py", line 2363, in save_uistate
    self.uistate['windowpos'] = self.get_position()
  File "/Users/reagle/bin/zim-0.68/zim/config/dicts.py", line 549, in __setitem__
    raise KeyError('Config key "%s" has not been defined' % k)
KeyError: 'Config key "windowpos" has not been defined'
INFO: Open page: Misc:Housing (Misc:Housing)
DEBUG: BackgroundCheck started
DEBUG: BackgroundCheck finished
Traceback (most recent call last):
  File "/Users/reagle/bin/zim-0.68/zim/gui/__init__.py", line 2411, in on_close_page
    self.save_uistate()
  File "/Users/reagle/bin/zim-0.68/zim/gui/__init__.py", line 2363, in save_uistate
    self.uistate['windowpos'] = self.get_position()
  File "/Users/reagle/bin/zim-0.68/zim/config/dicts.py", line 549, in __setitem__
    raise KeyError('Config key "%s" has not been defined' % k)
KeyError: 'Config key "windowpos" has not been defined'
INFO: Open page: Misc:Finance (Misc:Finance)
```


Follow ups

References