git fails when using French locale
Affects | Status | Importance | Assigned to | Milestone | |
---|---|---|---|---|---|
Zim |
Confirmed
|
Undecided
|
Unassigned |
Bug Description
I played around using the git version control and automatic save. I notice a git error 1 everytime I start zim using my French locale. Don't know if this is related to the accents used in the commit text (although I manually used the exact same line and it worked).
The error disappears if I first export LANG to en_US.
Here is the log when it crashes:
# export LANG=fr_FR.UTF-8
zimtest [master] % zim -D
INFO: This is zim 0.60
DEBUG: Python version is sys.version_
DEBUG: Platform is posix
DEBUG: Zim revision is:
branch: pyzim-trunk
revision: 672 <email address hidden>
date: 2013-04-30 19:27:20 +0200
DEBUG: Not running from a source dir
DEBUG: Set XDG_DATA_HOME to /home/alpha/
DEBUG: Set XDG_DATA_DIRS to [<Dir: /usr/share>, <Dir: /usr/local/share>]
DEBUG: Set XDG_CONFIG_HOME to /home/alpha/.config
DEBUG: Set XDG_CONFIG_DIRS to [<Dir: /etc/xdg>]
DEBUG: Set XDG_CACHE_HOME to /home/alpha/.cache
DEBUG: Running command: gui
DEBUG: Loading config from: /home/alpha/
DEBUG: Loading config from: /home/alpha/
DEBUG: Wrote /home/alpha/
INFO: Opening default notebook
DEBUG: Remote call from 11680: <RemoteMethodCall: 11680: zim.ipc.
DEBUG: Starting server by spawning new process
INFO: Spawning: ['/usr/
DEBUG: Process started with PID: 11682
DEBUG: Remote call from 11680: <RemoteMethodCall: 11680: zim.ipc.
INFO: Server starting 11682 at /tmp/zim-
DEBUG: Remote call from 11680: <RemoteMethodCall: 11680: zim.ipc.
DEBUG: Remote call returned to 11680: ('ACK', 11682)
DEBUG: Remote call from 11680: <RemoteMethodCall: 11680: zim.ipc.
DEBUG: Remote call returned to 11680: False
DEBUG: Remote call from 11680: <RemoteMethodCall: 11680: zim.ipc.
DEBUG: Loading config from: <ConfigFile: /home/alpha/
DEBUG: Gtk version is (2, 24, 22)
DEBUG: Pygtk version is (2, 24, 0)
WARNING: Could not find all icon sizes for the application icon
DEBUG: Loading config from: <ConfigFile: /home/alpha/
DEBUG: Opening notebook: file://
DEBUG: Wrote <UnixFile: /home/alpha/
INFO: Remove file: <UnixFile: /home/alpha/
DEBUG: Loading config from: <UnixFile: /home/alpha/
DEBUG: Cache dir: <Dir: /home/alpha/
DEBUG: Index database file: <UnixFile: /home/alpha/
DEBUG: Loading config from: <UnixFile: /home/alpha/
DEBUG: Loaded plugin "arithmetic" (<ArithmeticPlugin object at 0x3549fa0 (zim+plugins+
DEBUG: Loaded plugin "attachmentbrowser" (<AttachmentBro
DEBUG: Loaded plugin "backlinkpane" (<BackLinksPane
WARNING: Invalid config value for granularity: "Day" - should be one of (u'Jour', u'Semaine', u'Mois', u'Ann\xe9e')
DEBUG: Loaded plugin "calendar" (<CalendarPlugin object at 0x354d0f0 (zim+plugins+
DEBUG: Registered plugin <InsertDiagramP
DEBUG: Loaded plugin "diagrameditor" (<InsertDiagram
DEBUG: Loaded plugin "distractionfree" (<DistractionFr
DEBUG: Registered plugin <InsertDitaaPlugin object at 0x354d6e0 (zim+plugins+
DEBUG: Loaded plugin "ditaaeditor" (<InsertDitaaPlugin object at 0x354d6e0 (zim+plugins+
DEBUG: Loaded plugin "inlinecalculator" (<InlineCalcula
DEBUG: Loaded plugin "insertsymbol" (<InsertSymbolP
DEBUG: Loaded plugin "linesorter" (<LineSorterPlugin object at 0x354d9b0 (zim+plugins+
DEBUG: Loaded plugin "linkmap" (<LinkMapPlugin object at 0x354daa0 (zim+plugins+
DEBUG: Loaded plugin "printtobrowser" (<PrintToBrowse
DEBUG: Loaded plugin "quicknote" (<QuickNotePlugin object at 0x355c140 (zim+plugins+
DEBUG: Loaded plugin "screenshot" (<InsertScreens
DEBUG: Loaded plugin "spell" (<SpellPlugin object at 0x355cf00 (zim+plugins+
DEBUG: Loaded plugin "tableofcontents" (<ToCPlugin object at 0x3617050 (zim+plugins+
DEBUG: Loaded plugin "tags" (<TagsPlugin object at 0x3617190 (zim+plugins+
DEBUG: Loaded plugin "tasklist" (<TaskListPlugin object at 0x3617460 (zim+plugins+
INFO: VCS detected: git - <Dir: /home/alpha/
INFO: Automatically saving version
INFO: Running: ['git', 'status'] (cwd: /home/alpha/
DEBUG: Loaded plugin "versioncontrol" (<VersionContro
DEBUG: Child process started 11684 for <RemoteObject: zim.gui.
INFO: Starting async index update
DEBUG: Remote call returned to 11680: True
DEBUG: Remote call from 11680: <RemoteMethodCall: 11680: zim.gui.
INFO: Open page: <FileStorePage: Home> (<HistoryPath: Home>)
INFO: Running: ['git', 'add', '.'] (cwd: /home/alpha/
INFO: Running: ['git', 'status'] (cwd: /home/alpha/
INFO: Running: ['git', 'commit', '-a', '-m', 'Version enregistr\xc3\xa9e automatiquement depuis Zim'] (cwd: /home/alpha/
DEBUG: Found template 'Default' for <FileStorePage: Home>
INFO: Loading template from: <UnixFile: /usr/share/
DEBUG: Accelmap: /home/alpha/
DEBUG: Wrote <UnixFile: /home/alpha/
INFO: Accelerator changed for <Actions>
INFO: Accelerator changed for <Actions>
DEBUG: Action: set_pathbar_recent
DEBUG: Action: toggle_
DEBUG: Remote call returned to 11680: None
DEBUG:
NOTE FOR BUG REPORTS:
At this point zim has send the command to open a notebook to a
background process and the current process will now quit.
If this is the end of your debug output it is probably not useful
for bug reports. Please close all zim windows, quit the
zim trayicon (if any), and try again.
ERROR: Error during async commit
Traceback (most recent call last):
File "/usr/lib/
self.result = function(*args, **kwargs)
File "/usr/lib/
self.
File "/usr/lib/
return self.run(params)
File "/usr/lib/
self.
File "/usr/lib/
raise ApplicationErro
ApplicationError: Echec du lancement de l'application : git
git "commit" "-a" "-m" "Version enregistrée automatiquement depuis Zim"
a retourné un code d'erreur : 1
DEBUG: Running ErrorDialog
Traceback (most recent call last):
File "/usr/lib/
record = self.queue.get()
File "/usr/lib/
res = self._recv()
TypeError: ('__init__() takes exactly 5 arguments (1 given)', <class 'zim.applicatio
zimtest [master] % INFO: Accelerator changed for <Actions>
INFO: Index update done
DEBUG: Action: close (delete-event)
DEBUG: Wrote <UnixFile: /home/alpha/
INFO: Automatically saving version
INFO: Running: ['git', 'status'] (cwd: /home/alpha/
DEBUG: Remote call from 11684: <RemoteMethodCall: 11684: zim.ipc.
INFO: Last child quit, stopping server
DEBUG: Server stopped listening
INFO: Remove file: /tmp/zim-
DEBUG: Server process 11682 quit
DEBUG: Remote call returned to 11684: True
DEBUG: Child process 11684 quit
DEBUG: Server thread for process 11684 quit
Same exact workbook, just changed the LANG variable before starting it:
# export LANG=en_US.UTF-8
zimtest [master] % zim -D
INFO: This is zim 0.60
DEBUG: Python version is sys.version_
DEBUG: Platform is posix
DEBUG: Zim revision is:
branch: pyzim-trunk
revision: 672 <email address hidden>
date: 2013-04-30 19:27:20 +0200
DEBUG: Not running from a source dir
DEBUG: Set XDG_DATA_HOME to /home/alpha/
DEBUG: Set XDG_DATA_DIRS to [<Dir: /usr/share>, <Dir: /usr/local/share>]
DEBUG: Set XDG_CONFIG_HOME to /home/alpha/.config
DEBUG: Set XDG_CONFIG_DIRS to [<Dir: /etc/xdg>]
DEBUG: Set XDG_CACHE_HOME to /home/alpha/.cache
DEBUG: Running command: gui
DEBUG: Loading config from: /home/alpha/
DEBUG: Loading config from: /home/alpha/
DEBUG: Wrote /home/alpha/
INFO: Opening default notebook
DEBUG: Remote call from 11879: <RemoteMethodCall: 11879: zim.ipc.
DEBUG: Starting server by spawning new process
INFO: Spawning: ['/usr/
DEBUG: Process started with PID: 11881
DEBUG: Remote call from 11879: <RemoteMethodCall: 11879: zim.ipc.
INFO: Server starting 11881 at /tmp/zim-
DEBUG: Remote call from 11879: <RemoteMethodCall: 11879: zim.ipc.
DEBUG: Remote call returned to 11879: ('ACK', 11881)
DEBUG: Remote call from 11879: <RemoteMethodCall: 11879: zim.ipc.
DEBUG: Remote call returned to 11879: False
DEBUG: Remote call from 11879: <RemoteMethodCall: 11879: zim.ipc.
DEBUG: Loading config from: <ConfigFile: /home/alpha/
DEBUG: Gtk version is (2, 24, 22)
DEBUG: Pygtk version is (2, 24, 0)
WARNING: Could not find all icon sizes for the application icon
DEBUG: Loading config from: <ConfigFile: /home/alpha/
DEBUG: Opening notebook: file://
DEBUG: Wrote <UnixFile: /home/alpha/
INFO: Remove file: <UnixFile: /home/alpha/
DEBUG: Loading config from: <UnixFile: /home/alpha/
DEBUG: Cache dir: <Dir: /home/alpha/
DEBUG: Index database file: <UnixFile: /home/alpha/
DEBUG: Loading config from: <UnixFile: /home/alpha/
DEBUG: Loaded plugin "arithmetic" (<ArithmeticPlugin object at 0x2ae30f0 (zim+plugins+
DEBUG: Loaded plugin "attachmentbrowser" (<AttachmentBro
DEBUG: Loaded plugin "backlinkpane" (<BackLinksPane
WARNING: Invalid config value for granularity: "Jour" - should be one of (u'Day', u'Week', u'Month', u'Year')
DEBUG: Loaded plugin "calendar" (<CalendarPlugin object at 0x2ae31e0 (zim+plugins+
DEBUG: Registered plugin <InsertDiagramP
DEBUG: Loaded plugin "diagrameditor" (<InsertDiagram
DEBUG: Loaded plugin "distractionfree" (<DistractionFr
DEBUG: Registered plugin <InsertDitaaPlugin object at 0x2ae37d0 (zim+plugins+
DEBUG: Loaded plugin "ditaaeditor" (<InsertDitaaPlugin object at 0x2ae37d0 (zim+plugins+
DEBUG: Loaded plugin "inlinecalculator" (<InlineCalcula
DEBUG: Loaded plugin "insertsymbol" (<InsertSymbolP
DEBUG: Loaded plugin "linesorter" (<LineSorterPlugin object at 0x2ae3aa0 (zim+plugins+
DEBUG: Loaded plugin "linkmap" (<LinkMapPlugin object at 0x2ae3b90 (zim+plugins+
DEBUG: Loaded plugin "printtobrowser" (<PrintToBrowse
DEBUG: Loaded plugin "quicknote" (<QuickNotePlugin object at 0x2af0230 (zim+plugins+
DEBUG: Loaded plugin "screenshot" (<InsertScreens
DEBUG: Loaded plugin "spell" (<SpellPlugin object at 0x2af0f50 (zim+plugins+
DEBUG: Loaded plugin "tableofcontents" (<ToCPlugin object at 0x2b2d0a0 (zim+plugins+
DEBUG: Loaded plugin "tags" (<TagsPlugin object at 0x2b2d1e0 (zim+plugins+
DEBUG: Loaded plugin "tasklist" (<TaskListPlugin object at 0x2b2d4b0 (zim+plugins+
INFO: VCS detected: git - <Dir: /home/alpha/
INFO: Automatically saving version
INFO: Running: ['git', 'status'] (cwd: /home/alpha/
DEBUG: Loaded plugin "versioncontrol" (<VersionContro
DEBUG: Child process started 11883 for <RemoteObject: zim.gui.
INFO: Starting async index update
DEBUG: Remote call returned to 11879: True
DEBUG: Remote call from 11879: <RemoteMethodCall: 11879: zim.gui.
INFO: Open page: <FileStorePage: Home> (<HistoryPath: Home>)
INFO: Running: ['git', 'add', '.'] (cwd: /home/alpha/
INFO: Running: ['git', 'status'] (cwd: /home/alpha/
DEBUG: Found template 'Default' for <FileStorePage: Home>
INFO: Loading template from: <UnixFile: /usr/share/
DEBUG: Accelmap: /home/alpha/
DEBUG: Wrote <UnixFile: /home/alpha/
INFO: Accelerator changed for <Actions>
INFO: Accelerator changed for <Actions>
DEBUG: Action: set_pathbar_recent
DEBUG: Action: toggle_
DEBUG: Remote call returned to 11879: None
DEBUG:
NOTE FOR BUG REPORTS:
At this point zim has send the command to open a notebook to a
background process and the current process will now quit.
If this is the end of your debug output it is probably not useful
for bug reports. Please close all zim windows, quit the
zim trayicon (if any), and try again.
INFO: Accelerator changed for <Actions>
zimtest [master] % INFO: Index update done
DEBUG: Action: show_versions
INFO: Running: ['git', 'log', '--date=iso'] (cwd: /home/alpha/
DEBUG: Opening dialog "Versions - Zim"
DEBUG: Closed dialog "Versions"
DEBUG: Action: quit
DEBUG: Wrote <UnixFile: /home/alpha/
INFO: Automatically saving version
DEBUG: Action: toggle_
DEBUG: Action: toggle_
INFO: Running: ['git', 'status'] (cwd: /home/alpha/
DEBUG: Remote call from 11883: <RemoteMethodCall: 11883: zim.ipc.
INFO: Last child quit, stopping server
DEBUG: Server stopped listening
INFO: Remove file: /tmp/zim-
DEBUG: Server process 11881 quit
DEBUG: Remote call returned to 11883: True
DEBUG: Child process 11883 quit
DEBUG: Server thread for process 11883 quit
Looks related to the encoding of the message string.
Could you check the filesystem encoding as understood by python?
Run in a terminal:
$ python -c "import sys; print sys.getfilesyst emencoding( )"
In particular would like to know if it differs if you change the LANG
variable. I don't expect so, but just to be sure.
Else it could be that git itself changes behavior for different LANG (which
is strange since both specify UTF8 encoding...). If so we need to do some
special conversion to make encoding match git's expectation.
Regards,
Jaap
On Fri, Nov 29, 2013 at 5:04 PM, Alphazo <email address hidden> wrote:
> Public bug reported: info(major= 2, minor=7, micro=5, 'final' , serial=0) .local/ share Notebooks/ Notes/notebook. zim zimtest/ notebook. zim .config/ zim/notebooks. list Server( None).ping( (), {})> bin/python2' , '/usr/bin/zim', '--ipc- server- main', alpha/zim- server- socket' , '10'] (cwd: None) Server( None).ping( (), {})> alpha/zim- server- socket Server( None).ping( (), {})> Server( None).has_ object( (<RemoteObject: GtkInterface( file:// /home/alpha/ zimtest) >,), {})> Server( None).init_ object( (<RemoteObject: GtkInterface( file:// /home/alpha/ zimtest) >,), {})> .config/ zim/preferences .conf>
>
> I played around using the git version control and automatic save. I
> notice a git error 1 everytime I start zim using my French locale. Don't
> know if this is related to the accents used in the commit text (although
> I manually used the exact same line and it worked).
>
> The error disappears if I first export LANG to en_US.
>
> Here is the log when it crashes:
>
> # export LANG=fr_FR.UTF-8
> zimtest [master] % zim -D
> INFO: This is zim 0.60
> DEBUG: Python version is sys.version_
> releaselevel=
> DEBUG: Platform is posix
> DEBUG: Zim revision is:
> branch: pyzim-trunk
> revision: 672 <email address hidden>
> date: 2013-04-30 19:27:20 +0200
> DEBUG: Not running from a source dir
> DEBUG: Set XDG_DATA_HOME to /home/alpha/
> DEBUG: Set XDG_DATA_DIRS to [<Dir: /usr/share>, <Dir: /usr/local/share>]
> DEBUG: Set XDG_CONFIG_HOME to /home/alpha/.config
> DEBUG: Set XDG_CONFIG_DIRS to [<Dir: /etc/xdg>]
> DEBUG: Set XDG_CACHE_HOME to /home/alpha/.cache
> DEBUG: Running command: gui
> DEBUG: Loading config from: /home/alpha/
> DEBUG: Loading config from: /home/alpha/
> DEBUG: Wrote /home/alpha/
> INFO: Opening default notebook
> DEBUG: Remote call from 11680: <RemoteMethodCall: 11680:
> zim.ipc.
> DEBUG: Starting server by spawning new process
> INFO: Spawning: ['/usr/
> '/tmp/zim-
> DEBUG: Process started with PID: 11682
> DEBUG: Remote call from 11680: <RemoteMethodCall: 11680:
> zim.ipc.
> INFO: Server starting 11682 at /tmp/zim-
> DEBUG: Remote call from 11680: <RemoteMethodCall: 11680:
> zim.ipc.
> DEBUG: Remote call returned to 11680: ('ACK', 11682)
> DEBUG: Remote call from 11680: <RemoteMethodCall: 11680:
> zim.ipc.
> zim.gui.
> DEBUG: Remote call returned to 11680: False
> DEBUG: Remote call from 11680: <RemoteMethodCall: 11680:
> zim.ipc.
> zim.gui.
> DEBUG: Loading config from: <ConfigFile:
> /home/alpha/
> DEBUG: Gtk version is (2, 24, 22)
> DEBUG: Pygtk version is (2, 24, 0)
> WARNING: Could not find all icon sizes for...