Zim

git fails when using French locale

Bug #1256367 reported by Alphazo
6
This bug affects 1 person
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_info(major=2, minor=7, micro=5, releaselevel='final', serial=0)
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/.local/share
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/Notebooks/Notes/notebook.zim
DEBUG: Loading config from: /home/alpha/zimtest/notebook.zim
DEBUG: Wrote /home/alpha/.config/zim/notebooks.list
INFO: Opening default notebook
DEBUG: Remote call from 11680: <RemoteMethodCall: 11680: zim.ipc.Server(None).ping((), {})>
DEBUG: Starting server by spawning new process
INFO: Spawning: ['/usr/bin/python2', '/usr/bin/zim', '--ipc-server-main', '/tmp/zim-alpha/zim-server-socket', '10'] (cwd: None)
DEBUG: Process started with PID: 11682
DEBUG: Remote call from 11680: <RemoteMethodCall: 11680: zim.ipc.Server(None).ping((), {})>
INFO: Server starting 11682 at /tmp/zim-alpha/zim-server-socket
DEBUG: Remote call from 11680: <RemoteMethodCall: 11680: zim.ipc.Server(None).ping((), {})>
DEBUG: Remote call returned to 11680: ('ACK', 11682)
DEBUG: Remote call from 11680: <RemoteMethodCall: 11680: zim.ipc.Server(None).has_object((<RemoteObject: zim.gui.GtkInterface(file:///home/alpha/zimtest)>,), {})>
DEBUG: Remote call returned to 11680: False
DEBUG: Remote call from 11680: <RemoteMethodCall: 11680: zim.ipc.Server(None).init_object((<RemoteObject: zim.gui.GtkInterface(file:///home/alpha/zimtest)>,), {})>
DEBUG: Loading config from: <ConfigFile: /home/alpha/.config/zim/preferences.conf>
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/.config/zim/style.conf>
DEBUG: Opening notebook: file:///home/alpha/zimtest
DEBUG: Wrote <UnixFile: /home/alpha/zimtest/.zim/tmp>
INFO: Remove file: <UnixFile: /home/alpha/zimtest/.zim/tmp>
DEBUG: Loading config from: <UnixFile: /home/alpha/zimtest/notebook.zim>
DEBUG: Cache dir: <Dir: /home/alpha/zimtest/.zim>
DEBUG: Index database file: <UnixFile: /home/alpha/zimtest/.zim/index.db>
DEBUG: Loading config from: <UnixFile: /home/alpha/zimtest/.zim/state.conf>
DEBUG: Loaded plugin "arithmetic" (<ArithmeticPlugin object at 0x3549fa0 (zim+plugins+PluginClass at 0x30f78a0)>)
DEBUG: Loaded plugin "attachmentbrowser" (<AttachmentBrowserPlugin object at 0x354d050 (zim+plugins+PluginClass at 0x30f78c0)>)
DEBUG: Loaded plugin "backlinkpane" (<BackLinksPanePlugin object at 0x354d0a0 (zim+plugins+PluginClass at 0x30f2640)>)
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+PluginClass at 0x30f26c0)>)
DEBUG: Registered plugin <InsertDiagramPlugin object at 0x354d230 (zim+plugins+PluginClass at 0x30f7b20)> for image type "diagram"
DEBUG: Loaded plugin "diagrameditor" (<InsertDiagramPlugin object at 0x354d230 (zim+plugins+PluginClass at 0x30f7b20)>)
DEBUG: Loaded plugin "distractionfree" (<DistractionFreePlugin object at 0x354d320 (zim+plugins+PluginClass at 0x30f7d60)>)
DEBUG: Registered plugin <InsertDitaaPlugin object at 0x354d6e0 (zim+plugins+PluginClass at 0x30f7d40)> for image type "ditaa"
DEBUG: Loaded plugin "ditaaeditor" (<InsertDitaaPlugin object at 0x354d6e0 (zim+plugins+PluginClass at 0x30f7d40)>)
DEBUG: Loaded plugin "inlinecalculator" (<InlineCalculatorPlugin object at 0x354d7d0 (zim+plugins+PluginClass at 0x30f7f80)>)
DEBUG: Loaded plugin "insertsymbol" (<InsertSymbolPlugin object at 0x354d8c0 (zim+plugins+PluginClass at 0x30f7c80)>)
DEBUG: Loaded plugin "linesorter" (<LineSorterPlugin object at 0x354d9b0 (zim+plugins+PluginClass at 0x2f19480)>)
DEBUG: Loaded plugin "linkmap" (<LinkMapPlugin object at 0x354daa0 (zim+plugins+PluginClass at 0x30f7e60)>)
DEBUG: Loaded plugin "printtobrowser" (<PrintToBrowserPlugin object at 0x354de60 (zim+plugins+PluginClass at 0x30f8e80)>)
DEBUG: Loaded plugin "quicknote" (<QuickNotePlugin object at 0x355c140 (zim+plugins+PluginClass at 0x30f8ea0)>)
DEBUG: Loaded plugin "screenshot" (<InsertScreenshotPlugin object at 0x355ce10 (zim+plugins+PluginClass at 0x30f90a0)>)
DEBUG: Loaded plugin "spell" (<SpellPlugin object at 0x355cf00 (zim+plugins+PluginClass at 0x30f9280)>)
DEBUG: Loaded plugin "tableofcontents" (<ToCPlugin object at 0x3617050 (zim+plugins+PluginClass at 0x30fb500)>)
DEBUG: Loaded plugin "tags" (<TagsPlugin object at 0x3617190 (zim+plugins+PluginClass at 0x30f8f40)>)
DEBUG: Loaded plugin "tasklist" (<TaskListPlugin object at 0x3617460 (zim+plugins+tasklist+TaskListPlugin at 0x30fb820)>)
INFO: VCS detected: git - <Dir: /home/alpha/zimtest>
INFO: Automatically saving version
INFO: Running: ['git', 'status'] (cwd: /home/alpha/zimtest)
DEBUG: Loaded plugin "versioncontrol" (<VersionControlPlugin object at 0x361b5a0 (zim+plugins+PluginClass at 0x30fb640)>)
DEBUG: Child process started 11684 for <RemoteObject: zim.gui.GtkInterface(file:///home/alpha/zimtest)>
INFO: Starting async index update
DEBUG: Remote call returned to 11680: True
DEBUG: Remote call from 11680: <RemoteMethodCall: 11680: zim.gui.GtkInterface(file:///home/alpha/zimtest).present((None,), {})>
INFO: Open page: <FileStorePage: Home> (<HistoryPath: Home>)
INFO: Running: ['git', 'add', '.'] (cwd: /home/alpha/zimtest)
INFO: Running: ['git', 'status'] (cwd: /home/alpha/zimtest)
INFO: Running: ['git', 'commit', '-a', '-m', 'Version enregistr\xc3\xa9e automatiquement depuis Zim'] (cwd: /home/alpha/zimtest)
DEBUG: Found template 'Default' for <FileStorePage: Home>
INFO: Loading template from: <UnixFile: /usr/share/zim/templates/wiki/Default.txt>
DEBUG: Accelmap: /home/alpha/.config/zim/accelmap
DEBUG: Wrote <UnixFile: /home/alpha/.config/zim/preferences.conf>
INFO: Accelerator changed for <Actions>/MainWindowExtension/calculate
INFO: Accelerator changed for <Actions>/MainWindowExtension/print_to_browser
DEBUG: Action: set_pathbar_recent
DEBUG: Action: toggle_fileview(True)
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/python2.7/site-packages/zim/async.py", line 106, in wrapper
    self.result = function(*args, **kwargs)
  File "/usr/lib/python2.7/site-packages/zim/plugins/versioncontrol/__init__.py", line 360, in _commit
    self.vcs.commit(None, msg)
  File "/usr/lib/python2.7/site-packages/zim/plugins/versioncontrol/git.py", line 107, in commit
    return self.run(params)
  File "/usr/lib/python2.7/site-packages/zim/plugins/versioncontrol/__init__.py", line 438, in run
    self._app.run(params, self.root)
  File "/usr/lib/python2.7/site-packages/zim/applications.py", line 184, in run
    raise ApplicationError(argv[0], argv[1:], p.returncode, p.stderr.read())
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/python2.7/site-packages/zim/ipc.py", line 902, in run
    record = self.queue.get()
  File "/usr/lib/python2.7/multiprocessing/queues.py", line 117, in get
    res = self._recv()
TypeError: ('__init__() takes exactly 5 arguments (1 given)', <class 'zim.applications.ApplicationError'>, ())
zimtest [master] % INFO: Accelerator changed for <Actions>/MainWindowExtension/toggle_fileview
INFO: Index update done
DEBUG: Action: close (delete-event)
DEBUG: Wrote <UnixFile: /home/alpha/zimtest/.zim/state.conf>
INFO: Automatically saving version
INFO: Running: ['git', 'status'] (cwd: /home/alpha/zimtest)
DEBUG: Remote call from 11684: <RemoteMethodCall: 11684: zim.ipc.Server(None).on_object_quit((<RemoteObject: zim.gui.GtkInterface(file:///home/alpha/zimtest)>,), {})>
INFO: Last child quit, stopping server
DEBUG: Server stopped listening
INFO: Remove file: /tmp/zim-alpha/zim-server-authkey
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_info(major=2, minor=7, micro=5, releaselevel='final', serial=0)
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/.local/share
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/Notebooks/Notes/notebook.zim
DEBUG: Loading config from: /home/alpha/zimtest/notebook.zim
DEBUG: Wrote /home/alpha/.config/zim/notebooks.list
INFO: Opening default notebook
DEBUG: Remote call from 11879: <RemoteMethodCall: 11879: zim.ipc.Server(None).ping((), {})>
DEBUG: Starting server by spawning new process
INFO: Spawning: ['/usr/bin/python2', '/usr/bin/zim', '--ipc-server-main', '/tmp/zim-alpha/zim-server-socket', '10'] (cwd: None)
DEBUG: Process started with PID: 11881
DEBUG: Remote call from 11879: <RemoteMethodCall: 11879: zim.ipc.Server(None).ping((), {})>
INFO: Server starting 11881 at /tmp/zim-alpha/zim-server-socket
DEBUG: Remote call from 11879: <RemoteMethodCall: 11879: zim.ipc.Server(None).ping((), {})>
DEBUG: Remote call returned to 11879: ('ACK', 11881)
DEBUG: Remote call from 11879: <RemoteMethodCall: 11879: zim.ipc.Server(None).has_object((<RemoteObject: zim.gui.GtkInterface(file:///home/alpha/zimtest)>,), {})>
DEBUG: Remote call returned to 11879: False
DEBUG: Remote call from 11879: <RemoteMethodCall: 11879: zim.ipc.Server(None).init_object((<RemoteObject: zim.gui.GtkInterface(file:///home/alpha/zimtest)>,), {})>
DEBUG: Loading config from: <ConfigFile: /home/alpha/.config/zim/preferences.conf>
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/.config/zim/style.conf>
DEBUG: Opening notebook: file:///home/alpha/zimtest
DEBUG: Wrote <UnixFile: /home/alpha/zimtest/.zim/tmp>
INFO: Remove file: <UnixFile: /home/alpha/zimtest/.zim/tmp>
DEBUG: Loading config from: <UnixFile: /home/alpha/zimtest/notebook.zim>
DEBUG: Cache dir: <Dir: /home/alpha/zimtest/.zim>
DEBUG: Index database file: <UnixFile: /home/alpha/zimtest/.zim/index.db>
DEBUG: Loading config from: <UnixFile: /home/alpha/zimtest/.zim/state.conf>
DEBUG: Loaded plugin "arithmetic" (<ArithmeticPlugin object at 0x2ae30f0 (zim+plugins+PluginClass at 0x23400c0)>)
DEBUG: Loaded plugin "attachmentbrowser" (<AttachmentBrowserPlugin object at 0x2ae3140 (zim+plugins+PluginClass at 0x233ea80)>)
DEBUG: Loaded plugin "backlinkpane" (<BackLinksPanePlugin object at 0x2ae3190 (zim+plugins+PluginClass at 0x233eb00)>)
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+PluginClass at 0x233eaa0)>)
DEBUG: Registered plugin <InsertDiagramPlugin object at 0x2ae3320 (zim+plugins+PluginClass at 0x2340360)> for image type "diagram"
DEBUG: Loaded plugin "diagrameditor" (<InsertDiagramPlugin object at 0x2ae3320 (zim+plugins+PluginClass at 0x2340360)>)
DEBUG: Loaded plugin "distractionfree" (<DistractionFreePlugin object at 0x2ae3410 (zim+plugins+PluginClass at 0x2340540)>)
DEBUG: Registered plugin <InsertDitaaPlugin object at 0x2ae37d0 (zim+plugins+PluginClass at 0x2340580)> for image type "ditaa"
DEBUG: Loaded plugin "ditaaeditor" (<InsertDitaaPlugin object at 0x2ae37d0 (zim+plugins+PluginClass at 0x2340580)>)
DEBUG: Loaded plugin "inlinecalculator" (<InlineCalculatorPlugin object at 0x2ae38c0 (zim+plugins+PluginClass at 0x2340760)>)
DEBUG: Loaded plugin "insertsymbol" (<InsertSymbolPlugin object at 0x2ae39b0 (zim+plugins+PluginClass at 0x2340460)>)
DEBUG: Loaded plugin "linesorter" (<LineSorterPlugin object at 0x2ae3aa0 (zim+plugins+PluginClass at 0x23050c0)>)
DEBUG: Loaded plugin "linkmap" (<LinkMapPlugin object at 0x2ae3b90 (zim+plugins+PluginClass at 0x23406e0)>)
DEBUG: Loaded plugin "printtobrowser" (<PrintToBrowserPlugin object at 0x2ae3f50 (zim+plugins+PluginClass at 0x23418a0)>)
DEBUG: Loaded plugin "quicknote" (<QuickNotePlugin object at 0x2af0230 (zim+plugins+PluginClass at 0x23418c0)>)
DEBUG: Loaded plugin "screenshot" (<InsertScreenshotPlugin object at 0x2af0e60 (zim+plugins+PluginClass at 0x2341ac0)>)
DEBUG: Loaded plugin "spell" (<SpellPlugin object at 0x2af0f50 (zim+plugins+PluginClass at 0x2341cc0)>)
DEBUG: Loaded plugin "tableofcontents" (<ToCPlugin object at 0x2b2d0a0 (zim+plugins+PluginClass at 0x2343d20)>)
DEBUG: Loaded plugin "tags" (<TagsPlugin object at 0x2b2d1e0 (zim+plugins+PluginClass at 0x2340200)>)
DEBUG: Loaded plugin "tasklist" (<TaskListPlugin object at 0x2b2d4b0 (zim+plugins+tasklist+TaskListPlugin at 0x2343da0)>)
INFO: VCS detected: git - <Dir: /home/alpha/zimtest>
INFO: Automatically saving version
INFO: Running: ['git', 'status'] (cwd: /home/alpha/zimtest)
DEBUG: Loaded plugin "versioncontrol" (<VersionControlPlugin object at 0x2b335f0 (zim+plugins+PluginClass at 0x2343e20)>)
DEBUG: Child process started 11883 for <RemoteObject: zim.gui.GtkInterface(file:///home/alpha/zimtest)>
INFO: Starting async index update
DEBUG: Remote call returned to 11879: True
DEBUG: Remote call from 11879: <RemoteMethodCall: 11879: zim.gui.GtkInterface(file:///home/alpha/zimtest).present((None,), {})>
INFO: Open page: <FileStorePage: Home> (<HistoryPath: Home>)
INFO: Running: ['git', 'add', '.'] (cwd: /home/alpha/zimtest)
INFO: Running: ['git', 'status'] (cwd: /home/alpha/zimtest)
DEBUG: Found template 'Default' for <FileStorePage: Home>
INFO: Loading template from: <UnixFile: /usr/share/zim/templates/wiki/Default.txt>
DEBUG: Accelmap: /home/alpha/.config/zim/accelmap
DEBUG: Wrote <UnixFile: /home/alpha/.config/zim/preferences.conf>
INFO: Accelerator changed for <Actions>/MainWindowExtension/calculate
INFO: Accelerator changed for <Actions>/MainWindowExtension/print_to_browser
DEBUG: Action: set_pathbar_recent
DEBUG: Action: toggle_fileview(True)
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>/MainWindowExtension/toggle_fileview
zimtest [master] % INFO: Index update done
DEBUG: Action: show_versions
INFO: Running: ['git', 'log', '--date=iso'] (cwd: /home/alpha/zimtest)
DEBUG: Opening dialog "Versions - Zim"
DEBUG: Closed dialog "Versions"
DEBUG: Action: quit
DEBUG: Wrote <UnixFile: /home/alpha/zimtest/.zim/state.conf>
INFO: Automatically saving version
DEBUG: Action: toggle_fileview(False)
DEBUG: Action: toggle_fileview(False)
INFO: Running: ['git', 'status'] (cwd: /home/alpha/zimtest)
DEBUG: Remote call from 11883: <RemoteMethodCall: 11883: zim.ipc.Server(None).on_object_quit((<RemoteObject: zim.gui.GtkInterface(file:///home/alpha/zimtest)>,), {})>
INFO: Last child quit, stopping server
DEBUG: Server stopped listening
INFO: Remove file: /tmp/zim-alpha/zim-server-authkey
DEBUG: Server process 11881 quit
DEBUG: Remote call returned to 11883: True
DEBUG: Child process 11883 quit
DEBUG: Server thread for process 11883 quit

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 1256367] [NEW] git fails when using French locale
Download full text (18.3 KiB)

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.getfilesystemencoding()"

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:
>
> 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_info(major=2, minor=7, micro=5,
> releaselevel='final', serial=0)
> 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/.local/share
> 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/Notebooks/Notes/notebook.zim
> DEBUG: Loading config from: /home/alpha/zimtest/notebook.zim
> DEBUG: Wrote /home/alpha/.config/zim/notebooks.list
> INFO: Opening default notebook
> DEBUG: Remote call from 11680: <RemoteMethodCall: 11680:
> zim.ipc.Server(None).ping((), {})>
> DEBUG: Starting server by spawning new process
> INFO: Spawning: ['/usr/bin/python2', '/usr/bin/zim', '--ipc-server-main',
> '/tmp/zim-alpha/zim-server-socket', '10'] (cwd: None)
> DEBUG: Process started with PID: 11682
> DEBUG: Remote call from 11680: <RemoteMethodCall: 11680:
> zim.ipc.Server(None).ping((), {})>
> INFO: Server starting 11682 at /tmp/zim-alpha/zim-server-socket
> DEBUG: Remote call from 11680: <RemoteMethodCall: 11680:
> zim.ipc.Server(None).ping((), {})>
> DEBUG: Remote call returned to 11680: ('ACK', 11682)
> DEBUG: Remote call from 11680: <RemoteMethodCall: 11680:
> zim.ipc.Server(None).has_object((<RemoteObject:
> zim.gui.GtkInterface(file:///home/alpha/zimtest)>,), {})>
> DEBUG: Remote call returned to 11680: False
> DEBUG: Remote call from 11680: <RemoteMethodCall: 11680:
> zim.ipc.Server(None).init_object((<RemoteObject:
> zim.gui.GtkInterface(file:///home/alpha/zimtest)>,), {})>
> DEBUG: Loading config from: <ConfigFile:
> /home/alpha/.config/zim/preferences.conf>
> DEBUG: Gtk version is (2, 24, 22)
> DEBUG: Pygtk version is (2, 24, 0)
> WARNING: Could not find all icon sizes for...

Revision history for this message
Alphazo (alphazo) wrote :

Suggested command reports the same "UTF-8" output and thus using one or the other LANG variable.

$ export LANG=en_US.UTF-8
$ python -c "import sys; print sys.getfilesystemencoding()"
$ UTF-8

$ export LANG=fr_FR.UTF-8
$ python -c "import sys; print sys.getfilesystemencoding()"
$ UTF-8

Revision history for this message
Alphazo (alphazo) wrote :

FYI, I tried to replace all the strings related to git in the French translation file in order to match the English one but that didn't help.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote : Re: [Bug 1256367] Re: git fails when using French locale

On Mon, Dec 2, 2013 at 9:56 AM, Alphazo <email address hidden> wrote:

> FYI, I tried to replace all the strings related to git in the French
> translation file in order to match the English one but that didn't help.
>

No the problem is an error in the git process, not in the zim process. So I
suspect that the way git decodes command line arguments depends on the
locale. Zim provides the command line arguments using "filesystem"
encoding, which is UTF8 in both cases. In specific the commit message
contains non-ascii characters, so wonder how that is handled in git.

Regards,

Jaap

Revision history for this message
Alphazo (alphazo) wrote :

For sanity check I tried to use a different backend (hg) and I didn't experience any issue using my French locale. So problem is definitely git related.

Revision history for this message
Jaap Karssenberg (jaap.karssenberg) wrote :

Will commit fix in rev677 to force utf-8 encoding for commands going to git. Not sure, but believe it may fix this issue.

Changed in zim:
status: New → 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
Revision history for this message
Alphazo (alphazo) wrote :
Download full text (8.1 KiB)

Hello,

I justed tried 0.61 and doesn't seem to fix the problem if I use LANG=fr_FR.UTF-8.

# export LANG=fr_FR.UTF-8
# zim -D
INFO: This is zim 0.61
DEBUG: Python version is sys.version_info(major=2, minor=7, micro=8, releaselevel='final', serial=0)
DEBUG: Platform is posix
DEBUG: Zim revision is:
  branch: pyzim-trunk
  revision: 692 <email address hidden>
  date: 2014-07-31 22:22:54 +0200
DEBUG: Not running from a source dir
DEBUG: Set XDG_DATA_HOME to /home/alpha/.local/share
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: Loading config from: <zim.notebook.VirtualFile object at 0x7f858728b790>
DEBUG: Loading config from: /home/alpha/PERSO/SYNC-DEDIBOX/zim/notebook.zim
DEBUG: Wrote /home/alpha/.config/zim/notebooks.list
INFO: Using default notebook: file:///home/alpha/PERSO/SYNC-DEDIBOX/zim
DEBUG: Wrote /home/alpha/PERSO/SYNC-DEDIBOX/zim/.zim/tmp
INFO: Remove file: /home/alpha/PERSO/SYNC-DEDIBOX/zim/.zim/tmp
DEBUG: Loading config from: /home/alpha/PERSO/SYNC-DEDIBOX/zim/notebook.zim
DEBUG: Cache dir: /home/alpha/PERSO/SYNC-DEDIBOX/zim/.zim
DEBUG: Index database file: /home/alpha/PERSO/SYNC-DEDIBOX/zim/.zim/index.db
DEBUG: Remote call from 23048: <RemoteMethodCall: 23048: zim.ipc.Server(None).ping((), {})>
DEBUG: Starting server by spawning new process
INFO: Spawning: ['/usr/bin/zim', '--ipc-server-main', '/tmp/zim-alpha/zim-server-socket', '10'] (cwd: None)
DEBUG: Process started with PID: 23050
DEBUG: Remote call from 23048: <RemoteMethodCall: 23048: zim.ipc.Server(None).ping((), {})>
INFO: Server starting 23050 at /tmp/zim-alpha/zim-server-socket
DEBUG: Remote call from 23048: <RemoteMethodCall: 23048: zim.ipc.Server(None).ping((), {})>
DEBUG: Remote call returned to 23048: ('ACK', 23050)
DEBUG: Remote call from 23048: <RemoteMethodCall: 23048: zim.ipc.Server(None).has_object((<RemoteObject: zim.gui.GtkInterface(file:///home/alpha/PERSO/SYNC-DEDIBOX/zim)>,), {})>
DEBUG: Remote call returned to 23048: False
DEBUG: Remote call from 23048: <RemoteMethodCall: 23048: zim.ipc.Server(None).init_object((<RemoteObject: zim.gui.GtkInterface(file:///home/alpha/PERSO/SYNC-DEDIBOX/zim)>,), {})>
DEBUG: Wrote <UnixFile: /home/alpha/PERSO/SYNC-DEDIBOX/zim/.zim/tmp>
INFO: Remove file: <UnixFile: /home/alpha/PERSO/SYNC-DEDIBOX/zim/.zim/tmp>
DEBUG: Loading config from: <UnixFile: /home/alpha/PERSO/SYNC-DEDIBOX/zim/notebook.zim>
DEBUG: Cache dir: <Dir: /home/alpha/PERSO/SYNC-DEDIBOX/zim/.zim>
DEBUG: Index database file: <UnixFile: /home/alpha/PERSO/SYNC-DEDIBOX/zim/.zim/index.db>
DEBUG: Opening notebook: <zim.notebook.Notebook object at 0x7ff93e8e1f90>
DEBUG: Loading config from: <ConfigFile: /home/alpha/.config/zim/preferences.conf>
DEBUG: Loading plugin: arithmetic
DEBUG: Loading plugin: attachmentbrowser
DEBUG: Loading plugin: backlinkpane
DEBUG: Loading plugin: calendar
WARNING: Invalid config value for granularity: "Day" - Value should be one of (u'Jour', u'Semaine', u'Mois', u'Ann\xe9e')
DEBUG: Loading plugin: diagrameditor
DEBUG: Loading plugin: dist...

Read more...

Revision history for this message
Alphazo (alphazo) wrote :

I changed the status of the bug since the proposed released fix doesn't solve the problem in my case.

Changed in zim:
status: Fix Released → Confirmed
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.