Zim

Failed running on Czech Windows7 Home premium SP1 64-bit

Bug #1154091 reported by Martin Jonas
22
This bug affects 3 people
Affects Status Importance Assigned to Milestone
Zim
Fix Released
High
Unassigned

Bug Description

Zim wiki version: 0.59
OS: Windows7 Home premium SP1 64-bit (czech)

Error message:
Failed running: C:\Program Files (x86)\Zim Desktop Wiki\zim.exe

Problem is with both portable and desktop version.

Content of zim.log
---
INFO: Locale set to: cs_CZ.cp1250
ERROR: Failed running: C:\Program Files (x86)\Zim Desktop Wiki\zim.exe
Traceback (most recent call last):
  File "zim\applications.pyo", line 242, in spawn
Invalid string in argument vector at 2: Invalid byte sequence in conversion input
Traceback (most recent call last):
  File "zim.py", line 73, in <module>
  File "zim\__init__.pyo", line 443, in main
  File "zim\ipc.pyo", line 275, in start_server_if_not_running
AssertionError: Failed to start server (spawning)
---

Content of zim.exe.log (zim -D output)
---
INFO: Locale set to: cs_CZ.cp1250
INFO: This is zim 0.59
DEBUG: Python version is sys.version_info(major=2, minor=7, micro=3, releaselevel='final', serial=0)
DEBUG: Platform is nt
DEBUG: Zim revision is:
  branch: pyzim
  revision: 636 <email address hidden>
  date: 2013-01-23 22:07:40 +0100
DEBUG: Running from a source dir: D:\Disk Google\ZimWiki\ZimDesktopWikiPortable\App\ZimDesktopWiki
DEBUG: Set XDG_DATA_HOME to C:\Users\Martin Jonáš\AppData\Roaming\zim\data
Traceback (most recent call last):
  File "logging\__init__.pyo", line 846, in emit
  File "logging\__init__.pyo", line 723, in format
  File "logging\__init__.pyo", line 464, in format
  File "logging\__init__.pyo", line 328, in getMessage
UnicodeEncodeError: 'ascii' codec can't encode characters in position 25-26: ordinal not in range(128)
Logged from file config.pyo, line 204
DEBUG: Set XDG_CONFIG_HOME to C:\Users\Martin Jonáš\AppData\Roaming\zim\config
Traceback (most recent call last):
  File "logging\__init__.pyo", line 846, in emit
  File "logging\__init__.pyo", line 723, in format
  File "logging\__init__.pyo", line 464, in format
  File "logging\__init__.pyo", line 328, in getMessage
UnicodeEncodeError: 'ascii' codec can't encode characters in position 25-26: ordinal not in range(128)
Logged from file config.pyo, line 206
DEBUG: Set XDG_CACHE_HOME to C:\Users\MARTIN~1\AppData\Local\Temp\zim
DEBUG: Running command: gui
DEBUG: Loading config from: C:\Users\Martin Jonáš\Notebooks\Notes\notebook.zim
DEBUG: Wrote C:\Users\Martin Jonáš\AppData\Roaming\zim\config\zim\notebooks.list
INFO: Opening default notebook
DEBUG: Remote call from 4656: <RemoteMethodCall: 4656: zim.ipc.Server(None).ping((), {})>
DEBUG: Starting server by spawning new process
INFO: Spawning: ['D:\\Disk Google\\ZimWiki\\ZimDesktopWikiPortable\\App\\ZimDesktopWiki\\zim.exe', 'zim', '--ipc-server-main', '\\\\.\\pipe\\zimServer-Martin Jon\xe1\x9a', '10'] (cwd: None)
DEBUG: Running ErrorDialog
ERROR: Failed running D:\Disk Google\ZimWiki\ZimDesktopWikiPortable\App\ZimDesktopWiki\zim.exe
Traceback (most recent call last):
  File "zim\applications.pyo", line 242, in spawn
GError: Invalid string in argument vector at 2: Invalid byte sequence in conversion input
DEBUG: Remote call from 4656: <RemoteMethodCall: 4656: zim.ipc.Server(None).ping((), {})>
DEBUG: Remote call from 4656: <RemoteMethodCall: 4656: zim.ipc.Server(None).ping((), {})>
DEBUG: Remote call from 4656: <RemoteMethodCall: 4656: zim.ipc.Server(None).ping((), {})>
DEBUG: Remote call from 4656: <RemoteMethodCall: 4656: zim.ipc.Server(None).ping((), {})>
DEBUG: Remote call from 4656: <RemoteMethodCall: 4656: zim.ipc.Server(None).ping((), {})>
DEBUG: Remote call from 4656: <RemoteMethodCall: 4656: zim.ipc.Server(None).ping((), {})>
DEBUG: Remote call from 4656: <RemoteMethodCall: 4656: zim.ipc.Server(None).ping((), {})>
DEBUG: Remote call from 4656: <RemoteMethodCall: 4656: zim.ipc.Server(None).ping((), {})>
DEBUG: Remote call from 4656: <RemoteMethodCall: 4656: zim.ipc.Server(None).ping((), {})>
DEBUG: Remote call from 4656: <RemoteMethodCall: 4656: zim.ipc.Server(None).ping((), {})>
DEBUG: Cannot connect to server 4656:
Traceback (most recent call last):
  File "zim\ipc.pyo", line 264, in start_server_if_not_running
  File "zim\ipc.pyo", line 702, in call
  File "multiprocessing\connection.pyo", line 167, in Client
  File "multiprocessing\connection.pyo", line 368, in PipeClient
WindowsError: [Error 2] File not found

Traceback (most recent call last):
  File "zim.py", line 73, in <module>
  File "zim\__init__.pyo", line 443, in main
  File "zim\ipc.pyo", line 275, in start_server_if_not_running
AssertionError: Failed to start server (spawning)

---

Is it possible that problem is usage of national characters in my user folder name (C:\Users\Martin Jonáš\)

Tags: daemon
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 1154091] [NEW] Failed running on Windows7 Home premium SP1 64-bit

On Tue, Mar 12, 2013 at 2:46 PM, Martin Jonas <email address hidden> wrote:
> Public bug reported:
>
> Zim wiki version: 0.59
> OS: Windows7 Home premium SP1 64-bit
>
> Error message:
> Failed running: C:\Program Files (x86)\Zim Desktop Wiki\zim.exe
>
> Problem is with both portable and desktop version.
>
> When i run "zim -D" nothing more than above message is shown.
>
> Is there anything I can do to provide more detailed information?

Have a look at "zim.log" in the temporary folder (%TMP%). If zim
caused an error, output should be there, otherwise it is an error
occuring before zim is started.

-- Jaap

Revision history for this message
Martin Jonas (mpj-jonas) wrote : Re: Failed running on Windows7 Home premium SP1 64-bit

Content of zim.log
---
INFO: Locale set to: cs_CZ.cp1250
ERROR: Failed running: C:\Program Files (x86)\Zim Desktop Wiki\zim.exe
Traceback (most recent call last):
  File "zim\applications.pyo", line 242, in spawn
GError: Neplatný řetězec v poli argumentů na 2: Neplatná posloupnost bajtů na vstupu převodu
Traceback (most recent call last):
  File "zim.py", line 73, in <module>
  File "zim\__init__.pyo", line 443, in main
  File "zim\ipc.pyo", line 275, in start_server_if_not_running
AssertionError: Failed to start server (spawning)
---

Note: "Neplatný řetězec v poli argumentů na 2: Neplatná posloupnost bajtů na vstupu převodu" (czech) means something like "Invalid string in argument array at 2: Invalid byte sequence on conversion input"

I am using it on czech Windows. Can that be the problem?

Martin Jonas (mpj-jonas)
summary: - Failed running on Windows7 Home premium SP1 64-bit
+ Failed running on Czech Windows7 Home premium SP1 64-bit
Revision history for this message
Martin Jonas (mpj-jonas) wrote :

Content of zim.log (english translation)
---
INFO: Locale set to: cs_CZ.cp1250
ERROR: Failed running: C:\Program Files (x86)\Zim Desktop Wiki\zim.exe
Traceback (most recent call last):
  File "zim\applications.pyo", line 242, in spawn
Invalid string in argument vector at 2: Invalid byte sequence in conversion input
Traceback (most recent call last):
  File "zim.py", line 73, in <module>
  File "zim\__init__.pyo", line 443, in main
  File "zim\ipc.pyo", line 275, in start_server_if_not_running
AssertionError: Failed to start server (spawning)
---

Martin Jonas (mpj-jonas)
description: updated
Martin Jonas (mpj-jonas)
description: updated
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Yes, this has to do with character encoding - did a lot of work already to be robust for that - but apparently not enough :(

Looks like two issues:
1/ When spawning the application, the user name is used for the connection between subprocesses, apparently encoding fails there
2/ When you log with "zim -D" the logging start to give errors because it doesn't know how to convert those characters on output..

A work around may be to run "zim.exe --standalone" - this avoids spawning the additional process. Hope that helps, in the mean time I have to look again at encoding of the sub process parameters.

Regards,

Jaap

tags: added: daemon
Changed in zim:
status: New → Confirmed
importance: Undecided → Medium
importance: Medium → High
Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Trying to fix by enoding the tmp files and pipe names with URL encoding, so all characters will be ascii, that should avoid this kind of problem. Needs testing.

Will commit fix in rev708 in branch pyzim-refactor

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

Fixed in release 0.61

Changed in zim:
status: Fix Committed → Fix Released
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Duplicates of this bug

Other bug subscribers

Remote bug watches

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