littlecodersh / LocalNote

LocalNote让你能够像使用本地文件一样使用印象笔记。Use Evernote like local file system in all platform (markdown supported)
MIT License
178 stars 30 forks source link

.DS_Store 引起write_note报错 #5

Closed nailuoGG closed 8 years ago

nailuoGG commented 8 years ago

Mac 下报错

Downloading 0104#资源下载/.DS_Store
Traceback (most recent call last):
  File "/usr/local/var/pyenv/versions/2.7.11/bin/localnote", line 11, in <module>
    sys.exit(main())
  File "/usr/local/var/pyenv/versions/2.7.11/lib/python2.7/site-packages/LocalNote/main.py", line 174, in main
    argDict.get(sys.argv[0], (show_help,))[0](*sys.argv[1:])
  File "/usr/local/var/pyenv/versions/2.7.11/lib/python2.7/site-packages/LocalNote/main.py", line 31, in _check_files_format
    return fn(mainController, *args, **kwargs)
  File "/usr/local/var/pyenv/versions/2.7.11/lib/python2.7/site-packages/LocalNote/main.py", line 106, in pull
    r = mainController.download_notes(False)
  File "/usr/local/var/pyenv/versions/2.7.11/lib/python2.7/site-packages/LocalNote/controllers.py", line 120, in download_notes
    _download_note(noteFullPath)
  File "/usr/local/var/pyenv/versions/2.7.11/lib/python2.7/site-packages/LocalNote/controllers.py", line 97, in _download_note
    self.ls.write_note(noteFullPath, {})
  File "/usr/local/var/pyenv/versions/2.7.11/lib/python2.7/site-packages/LocalNote/local/storage.py", line 80, in write_note
    clear_dir(join(nbName, nName))
  File "/usr/local/var/pyenv/versions/2.7.11/lib/python2.7/site-packages/LocalNote/local/storage.py", line 160, in clear_dir
    dirs, files = os.walk(currentDir).next()[1:]
StopIteration
littlecodersh commented 8 years ago

@nailuoGG 是这个笔记的名字就叫.DS_Store吗?

zzkristy commented 8 years ago

.DS_Store是Mac下自动生成的文件,用来存储文件夹的显示属性。

littlecodersh commented 8 years ago

@zzkristy 这个我了解,那你有一个笔记叫做.DS_Store么? 我看日志你可能有一个。

Downloading 0104#资源下载/.DS_Store
zzkristy commented 8 years ago

没有一个日志叫.DS_Store。

问题出现在第一次pull时由于errorCode=19错误导致笔记没有下载完成,一个小时后再pull的时候会报错。删掉文件夹里的.DS_Store后就可以pull成功了

littlecodersh commented 8 years ago

@zzkristy 好的,一小时限制的抛出异常现在已经处理了。 这个问题稍后更新版本。

littlecodersh commented 8 years ago

@zzkristy 已更新版本,尝试使用pip install localnote --upgrade。 另,该文件夹会出现小写例如.ds_store的情况吗?