Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix corner case in zim newfs #23

Closed
mexicarne opened this issue May 8, 2017 · 1 comment
Closed

Fix corner case in zim newfs #23

mexicarne opened this issue May 8, 2017 · 1 comment
Labels
Milestone

Comments

@mexicarne
Copy link
Contributor

mexicarne commented May 8, 2017

Hello, there is some code missing in zim/newfs/__init__.py. It is triggered when user have locale not set. There is no logger object created, so it will fail with

No handlers could be found for logger "zim.fs"
Traceback (most recent call last):
  File "<string>", line 1, in <module>
  File "setup.py", line 25, in <module>
    import makeman # helper script
  File "makeman.py", line 14, in <module>
    from zim.main import HelpCommand
  File "zim/main/__init__.py", line 28, in <module>
    from zim.notebook import Notebook, Path, \
  File "zim/notebook/__init__.py", line 39, in <module>
    from .info import NotebookInfo, NotebookInfoList, \
  File "zim/notebook/info.py", line 19, in <module>
    from .notebook import NotebookConfig, _resolve_relative_config
  File "zim/notebook/notebook.py", line 22, in <module>
    from zim.newfs import LocalFolder
  File "zim/newfs/__init__.py", line 19, in <module>
    logger.warn('Filesystem encoding is set to ASCII or Latin1, using UTF-8 instead')
NameError: name 'logger' is not defined

Here is the patch we applied locally:

Also this is the only file with windows-style line endings. Would you please fix it too to make it consistent with overall code? Thank you.

@jaap-karssenberg
Copy link
Member

Will be fixes in c951d49

jaap-karssenberg added a commit that referenced this issue May 9, 2017
Added test to detect this common error
Also converted zim/newfs/__init__.py to use unix line end
@jaap-karssenberg jaap-karssenberg modified the milestone: Release 0.67 May 18, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants