Zim

Failure to switch Notebooks when running zim.pyw using --standalone flag

Bug #1535146 reported by lupin3r
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
Zim
New
Undecided
Unassigned

Bug Description

First, I'd like to thank you for a wonderful program and its continuous improvements.

To start, I'm running Zim 0.65 (latest) from source on a Windows 7 Home Premium 64-bit laptop. In order to get the latest Zim source to run on Windows, I installed the following dependencies:
* Install python-2.7.11.msi (ensure Python is added to PATH)
* Install pygtk-all-in-one-2.24.2.win32-py2.7
* Install pywin32-220.win32-py2.7.exe

For each version number, I created a new Notebook using the "File --> Open Another Notebook" dialog named "Test" and selected it to open. Between each version test, I deleted the "Notebooks" directory and the "C:\Users\Vic\AppData\Roaming\zim" directory. The file I open between each test is "zim.pyw" which is just "zim.py" renamed with no modifications.

0.58 Behavior --
Launching with --standalone: "Test" Notebook opens and the program title at the top is "Test".
Launching zim.pyw without "--standalone" flag shows notebook creation dialogue, but the program halts there (nothing in process manager).

0.59 Behavior --
Launching with --standalone: "Test" Notebook opens and the program title at the top is "Test".
Launching zim.pyw without "--standalone" flag shows same behavior as 0.58.

0.60 Behavior --
Launching with --standalone: "Test" Notebook opens and the program title at the top is "pythonw.exe" the first time it's opened. Closing and re-opening "Test" first causes the program title at the top to revert to "Test", and switching to the original "Notes" notebook shows the title at the top as "Notes".

Closing and re-opening "Notes" first reverts the title to "Notes" and switching to the "Test" notebook again oddly shows the title as "Test," and not "pythonw.exe". So it appears the "pythonw.exe" is a first-time launch bug.

Launching without "--standalone" flag shows Notebook creation dialogue and proceeds to open "Notebook", but the title at the top is "pythonw.exe" the first time it's launched. Closing and re-opening (without "--standalone" flag) shows normal behavior--can switch between Notebooks and the titles at the top match their Notebook.

0.61 Behavior --

Launching with --standalone: Creating "Test" Notebook works. However, attempting to select and open the "Test" notebook results in the following error:
"Failed running: C:\Users\Vic\Downloads\zim-0.61\zim.pyw". Closing and re-opening "Test" first works, and the title at the top is correct, showing "Test", but attempting to switch to the original "Notes" notebook results in the same error.

Launching without --standalone flag results in the same error message "Failed running ..." and emits a bug message:
" File "C:\Users\Vic\Downloads\ZIM\zim-0.61\zim\main.py", line 446, in main
    obj.run()
  File "C:\Users\Vic\Downloads\ZIM\zim-0.61\zim\main.py", line 211, in run
    zim.ipc.start_server_if_not_running()
  File "C:\Users\Vic\Downloads\ZIM\zim-0.61\zim\ipc.py", line 282, in start_server_if_not_running
    raise AssertionError, 'Failed to start server (spawning)'
AssertionError: Failed to start server (spawning)"

0.62 Behavior --

Launching with --standalone: same behavior as 0.61.
Launching without --standalone: same behavior and bug message as 0.61.

0.63 Behavior -- same behavior as 0.62 and 0.61.
0.64 Behavior -- same behavior as 0.62, 0.61, and 0.63.
0.65 Behavior -- same behavior as 0.64, 0.63, 0.62, and 0.61.

I would say the most ideal behavior was with 0.59 -- using zim.pyw extension along with --standalone flag allowed switching between new notebooks, and their titles displayed correctly at the top. Note that launching zim.py (no .pyw extension) on the latest source, 0.65, allows normal behavior (correct titles at the top, and no error upon switching notebooks), but the console is rather annoying, which is why I used the --standalone feature.

In other news, spell-check seems to be working on 0.65 using "gtkspellcheck". The steps I took to get spellcheck working (didn't work out the box), were as follows:
* Install python-2.7.11.msi (ensure Python is added to PATH)
* Install pygtk-all-in-one-2.24.2.win32-py2.7
* Install pywin32-220.win32-py2.7.exe (wasn't necessary for zim to launch from source in prior versions, seems to be a new dependency as of 0.64)
* Install pyenchant-1.6.6.win32.exe
* Add "C:\Python27\Lib\site-packages\enchant" to Windows PATH.
* From a CMD launched as Administrator, install pygtkspellcheck: "pip install pygtkspellcheck"

After that, Spellcheck works fine calling "gtkspellcheck" and seems to be the cleanest method I've found so far. I like the new features in 0.65, so I'll continue using it and deal with the annoying Zim cmd prompt, but I'd love to see these kinks worked out in future versions for the Windows side of things (allow launching zim.pyw --standalone and switching between notebooks without a bug message).

description: updated
description: updated
description: updated
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.