wiz2joplin
wiz2joplin copied to clipboard
FileNotFoundError
Dear zrong,
I tried this command:
$w2j -o ~/w2j -w ~/.wiznote -u [email protected] -t xxxxx -a
where xxxxx is client id coming from "Joplin->About Joplin", which has a same length of number as the token of Joplin web clipper (I downloaded it as a chrome extension but failed to find this ID out).
However, I got this warning messages:
Traceback (most recent call last):
File "/Users/xxx/w2j/venv/bin/w2j", line 33, in <module>
sys.exit(load_entry_point('w2j==0.4', 'console_scripts', 'w2j')())
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/init.py", line 64, in main
ws = wiz.WizStorage(args.wiz_user, wiznote_dir, is_group_storage=False, work_dir=output_dir)
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 366, in init
root_data_dir = DataDir(self.user_dir.joinpath('data/'))
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 216, in init
raise FileNotFoundError(f'找不到文件夹 {self.attachments_dir.resolve()}!')
FileNotFoundError: 找不到文件夹 /Users/xxx/.wiznote/[email protected]/data/attachments!
I tried to make a directory of "attachments" using
$mkdir attachments
under ~/.wiznote/[email protected]/data
Still, it warns me like this:
Please read [/Users/xxx/w2j/w2j.log] to check the conversion states.
Traceback (most recent call last):
File "/Users/xxx/w2j/venv/bin/w2j", line 33, in <module>
sys.exit(load_entry_point('w2j==0.4', 'console_scripts', 'w2j')())
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/init.py", line 65, in main
ad = adapter.Adapter(ws, jda, work_dir=output_dir)
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/adapter.py", line 413, in init
self.ws.resolve()
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 478, in resolve
self.documents = self.build_documents()
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 447, in build_documents
document = WizDocument(*row, self.data_dir.notes_dir, self.documents_dir, check_file=True)
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 146, in init
self.check_note_file()
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 150, in check_note_file
raise FileNotFoundError(f'找不到 note 文件 {self.note_file}!')
FileNotFoundError: 找不到 note 文件 /Users/xxx/.wiznote/[email protected]/data/notes/{3d1bd3e5-b664-41b4-9af8-32dfd36e1b27}!
My Python Version is: Python 3.9.6 MacOS Mojave, version 10.14.6 WizNote for Mac, (I tried both ) Version 2.7.9 (2019.10.21 1:2) and Version 2.8.7 (2020.8.19 22:28).
Could you give me some advice?
Thanks and best.
By default, wiznote will not sync your attachment files, I think you need change the configuration and sync everything before run w2j. I'm encountering other issues though><
Thanks for the reminding, I am syncing everything now following your advice.
I noticed one of the closed issues here have mentioned the same problem and being solved after syncing, however, I didn't realized that I need to change the configuration before syncing like this:
It also seems like after this configuration, the sync process really takes a lot of time, more than hours.
I Hope this works for me too and will feedback later.
Kind regards.
Hello again,
I have finished syncing most of the files, except some file always failed to sync, the console of the log says:
2021-07-26T22:22:23: [Sync] "----------Downloading notes----------"
2021-07-26T22:22:26: [Sync] "Downloading note: 该喝多少水?_京虎子_新浪博客"
2021-07-26T22:22:27: Failed to exec json request, network error=401, message=, url=https://hk01.wiz.cn/ks/note/download/a7a4792a-d237-11e1-a88b-00237def97cc/d2087334-9c14-4835-ad65-50ebbb538e73?downloadData=1&clientType=macos&clientVersion=2.8.7&apiVersion=10&token=60fd368e70df346769c807ac8c5b8ccfmxhqrfm91mcsyt&srcHost=hk01.wiz.cn
2021-07-26T22:22:27: Failed to download document data: 该喝多少水?_京虎子_新浪博客
2021-07-26T22:22:27: [Sync] "Cannot download note data from server: 该喝多少水?_京虎子_新浪博客"
2021-07-26T22:22:27: [Sync] "Cannot sync!"
2021-07-26T22:22:27: [Sync] "Set current database index: 1"
2021-07-26T22:22:27: [Sync] "Set current database index: 2"
2021-07-26T22:22:27: [Sync] "Set current database index: 3"
2021-07-26T22:22:27: [Sync] "----------Sync done----------"
2021-07-26T22:24:01: [Sync] quick download messages started, thread: 0x70000fc11000
2021-07-26T22:24:01: [Sync] "Quick download messages"
2021-07-26T22:27:00: [Sync] quick download messages started, thread: 0x70000fc11000
2021-07-26T22:27:00: [Sync] "Quick download messages"
- I can't find any information about "该喝多少水?_京虎子_新浪博客" in my wiznote by searching some keywords like "该喝多少水";
- In account setting, I tried to change the data storage settings, move current storage server "China HongKong" to other places like Russia or China but failed.
Meanwhile, by typing
$w2j -o ~/w2j -w ~/.wiznote -u [email protected] -t xxxxx -a
It still tells me that:
Please read [/Users/xxx/w2j/w2j.log] to check the conversion states.
Traceback (most recent call last):
File "/Users/xxx/w2j/venv/bin/w2j", line 33, in <module>
sys.exit(load_entry_point('w2j==0.4', 'console_scripts', 'w2j')())
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/init.py", line 65, in main
ad = adapter.Adapter(ws, jda, work_dir=output_dir)
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/adapter.py", line 413, in init
self.ws.resolve()
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 478, in resolve
self.documents = self.build_documents()
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 447, in build_documents
document = WizDocument(*row, self.data_dir.notes_dir, self.documents_dir, check_file=True)
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 146, in init
self.check_note_file()
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 150, in check_note_file
raise FileNotFoundError(f'找不到 note 文件 {self.note_file}!')
FileNotFoundError: 找不到 note 文件 /Users/xxx/.wiznote/[email protected]/data/notes/{3d1bd3e5-b664-41b4-9af8-32dfd36e1b27}!
I would try to set up a Ubuntu system in VirtualBoxto to install wiz version in Ubuntu version(I tried in Arc Linux but failed to install wiz), and feed back again.
Any advice would be appreciated.
Thank you very much.
@hairuo 你应该是使用的 macOS 吧?那就不必尝试 Ubuntu了。
ileNotFoundError: 找不到 note 文件 /Users/xxx/.wiznote/[email protected]/data/notes/{3d1bd3e5-b664-41b4-9af8-32dfd36e1b27}!
这个错误是没有找到附件文件,但为什么中间少了一个 attachments 文件夹,需要看一下 log 是个啥情况。
另外,如果 wiznote 遇到同步问题(本地 wiz 内容不全),可以采用 -l
参数指定一个 location 先转换部分内容试试。先成功一次嘛😄
最近太忙了,写 code 比较少,回复晚了见谅。
Yes, I have the same error:
Please read [C:\Users\Alex_Laptop\w2j\w2j.log] to check the conversion states.
Traceback (most recent call last):
File "C:\Python39\Scripts\w2j-script.py", line 33, in <module>
sys.exit(load_entry_point('w2j==0.4', 'console_scripts', 'w2j')())
File "C:\Python39\lib\site-packages\w2j\__init__.py", line 65, in main
ad = adapter.Adapter(ws, jda, work_dir=output_dir)
File "C:\Python39\lib\site-packages\w2j\adapter.py", line 413, in __init__
self.ws.resolve()
File "C:\Python39\lib\site-packages\w2j\wiz.py", line 478, in resolve
self.documents = self.build_documents()
File "C:\Python39\lib\site-packages\w2j\wiz.py", line 447, in build_documents
document = WizDocument(*row, self.data_dir.notes_dir, self.documents_dir, check_file=True)
File "C:\Python39\lib\site-packages\w2j\wiz.py", line 146, in __init__
self.check_note_file()
File "C:\Python39\lib\site-packages\w2j\wiz.py", line 150, in check_note_file
raise FileNotFoundError(f'找不到 note 文件 {self.note_file}!')
FileNotFoundError: 找不到 note 文件 C:\Users\Alex_Laptop\Documents\My Knowledge\Data\[email protected]\data\notes\{5d7d049d-817b-4729-95a9-347abe12c38b}!
w2j.log is empty I have the latest version of Wiznote 4.13.25 installed in Windows. BTW there is no "notes" folder that script ask initially, as well as wizthumb.db, only thumb.db in the root of the account folder, so if I create folders and rename .db the error above appeared. Apparently there is some folder structure variations between OS, but I don't know how to tweak it
@nopia-alexander Sorry, I haven't tested wiz2joplin under Windows...
谢谢回复:
是的我用的是MacOS,因为最后Windows笔记本的硬盘空间不够暂时没在虚拟机下装Ubuntu后面也没试。
- 请问你说的log是指wiz的log吗,不知道我前面贴出的log中的报错情况,和对应的少了一个文件夹是不是有关联。更完整的报错log内容如下:
Version: WizNote QTMAC 2.8.7
OS: Version 10.14.6 (Build 18G7016)
Username: [email protected]
Time: 2021-08-24 12:55:38
2021-08-24T12:44:16: [Sync] "----------Downloading notes----------"
2021-08-24T12:44:18: [Sync] "Downloading note: 该喝多少水?京虎子新浪博客"
2021-08-24T12:44:19: Failed to exec json request, network error=401, message=, url=https://hk01.wiz.cn/ks/note/download/a7a4792a-d237-11e1-a88b-00237def97cc/d2087334-9c14-4835-ad65-50ebbb538e73?downloadData=1&clientType=macos&clientVersion=2.8.7&apiVersion=10&token=60fd368e70df346769c807ac8c5b8ccfr4p4u4dgd0rg0z&srcHost=hk01.wiz.cn
2021-08-24T12:44:19: Failed to download document data: 该喝多少水?京虎子新浪博客
2021-08-24T12:44:19: [Sync] "Cannot download note data from server: 该喝多少水?京虎子新浪博客"
2021-08-24T12:44:19: [Sync] "Cannot sync!"
2021-08-24T12:44:19: [Sync] "Set current database index: 1"
2021-08-24T12:44:19: [Sync] "Set current database index: 2"
2021-08-24T12:44:19: [Sync] "Set current database index: 3"
2021-08-24T12:44:19: [Sync] "----------Sync done----------"
2021-08-24T12:44:20: [Sync] quick download messages started, thread: 0x70000fdb9000
2021-08-24T12:44:20: [Sync] "Quick download messages"
2021-08-24T12:44:22: 16777249 , ""
2021-08-24T12:44:36: network status check, downloaded bytes : 0 last time : 0 uploaded bytes : 0 last time : 0
2021-08-24T12:44:36: [sync]Xml rpc event loop time out
2021-08-24T12:44:36: downloader start to download : "[email protected]"
2021-08-24T12:44:37: [AvatarHost]avatar file exists , remove it : true
2021-08-24T12:44:37: [AvatarHost]fetching finished, guid: "[email protected]"
2021-08-24T12:44:37: downloader start to download : "[email protected]"
2021-08-24T12:44:37: QObject: Cannot create children for a parent that is in a different thread.
(Parent is QNetworkAccessManager(0x600003bc0a38), parent's thread is QThread(0x60000346b7c0), current thread is QThread(0x60000346b7a0)
2021-08-24T12:44:38: [AvatarHost]avatar file exists , remove it : true
2021-08-24T12:44:38: [AvatarHost]fetching finished, guid: "[email protected]"
2021-08-24T12:44:38: [AvatarHost]download pool is clean, thread: 0x11cb8c5c0
2021-08-24T12:47:21: [Sync] quick download messages started, thread: 0x70000fdb9000
2021-08-24T12:47:21: [Sync] "Quick download messages"
2021-08-24T12:47:57: [Sync] syncing all started, thread: 0x70000fdb9000
2021-08-24T12:47:57: client version: QTMAC(2.8.7)
2021-08-24T12:47:57: [Sync] "----------Sync start----------"
2021-08-24T12:47:57: [Sync] "Connecting to server"
2021-08-24T12:47:57: [Sync] Syncing all notes...
2021-08-24T12:47:57: [Sync] "Signing in"
2021-08-24T12:47:57: [Sync] "Get Biz info"
2021-08-24T12:47:58: downloader start to download : "[email protected]"
2021-08-24T12:47:58: [Sync] "Get groups info"
2021-08-24T12:47:58: QObject: Cannot create children for a parent that is in a different thread.
(Parent is QNetworkAccessManager(0x600003bc0a38), parent's thread is QThread(0x60000346b7c0), current thread is QThread(0x60000346b7a0)
2021-08-24T12:47:59: [CWizDatabaseManager] Group info downloaded...
2021-08-24T12:47:59: [Sync] "Set database count: 4"
2021-08-24T12:47:59: [Sync] "Downloading settings"
2021-08-24T12:47:59: [Sync] "Downloading messages"
2021-08-24T12:48:00: [AvatarHost]avatar file exists , remove it : true
2021-08-24T12:48:00: [AvatarHost]fetching finished, guid: "[email protected]"
2021-08-24T12:48:00: [AvatarHost]download pool is clean, thread: 0x11cb8c5c0
2021-08-24T12:48:01: [Sync] "Upload modified messages"
2021-08-24T12:48:01: get modified messages , size ; 0
2021-08-24T12:48:11: [Sync] "Sync group users"
2021-08-24T12:48:11: [Sync] "----------sync private notes----------"
btw,以上出现的邮箱[email protected]不是我的为知ID,我的为知ID都用[email protected]来代替了。
- “如果 wiznote 遇到同步问题(本地 wiz 内容不全),可以采用
-l
参数指定一个 location 先转换部分内容试试。”
这句话不太明白,-l 是指使用下述命令时:
$w2j -o ~/w2j -w ~/.wiznote -u [email protected] -t xxxxx -a
添加 -l 和 ~/.wiznote/xxxxx, xxxxx指代下面某个具体目录吗?
谢谢回复不急:pray:
@hairuo 你应该是使用的 macOS 吧?那就不必尝试 Ubuntu了。
ileNotFoundError: 找不到 note 文件 /Users/xxx/.wiznote/[email protected]/data/notes/{3d1bd3e5-b664-41b4-9af8-32dfd36e1b27}!
这个错误是没有找到附件文件,但为什么中间少了一个 attachments 文件夹,需要看一下 log 是个啥情况。
另外,如果 wiznote 遇到同步问题(本地 wiz 内容不全),可以采用
-l
参数指定一个 location 先转换部分内容试试。先成功一次嘛😄最近太忙了,写 code 比较少,回复晚了见谅。
-l
参数的说明在这里:
Convert the location of WizNote, e.g. /My Notes/. If you use the --all parameter, then skip --location parameter.
log file 指的的是 ~/w2j 文件夹下面的 w2j.log 文件。
wiz 同步的 log 没啥用的。
谢谢回复,试了试-l 好像也不行,运行如下:
w2j -o ~/w2j -w ~/.wiznote -u [email protected] -t 586f995aa0174a934a30f8363b013a93164d6afc5988e2ad5fd1dfefc3f802ba328ca0e3bb26998fc3d0a8f05da17f2b6cc59d84748508b436e2168b8d4438b3 -l '/My Note/01.Inbox/' -r
Please read [/Users/xxx/w2j/w2j.log] to check the conversion states.
Traceback (most recent call last):
File "/Users/xxx/w2j/venv/bin/w2j", line 33, in <module>
sys.exit(load_entry_point('w2j==0.4', 'console_scripts', 'w2j')())
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/init.py", line 65, in main
ad = adapter.Adapter(ws, jda, work_dir=output_dir)
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/adapter.py", line 413, in init
self.ws.resolve()
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 478, in resolve
self.documents = self.build_documents()
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 447, in build_documents
document = WizDocument(*row, self.data_dir.notes_dir, self.documents_dir, check_file=True)
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 146, in init
self.check_note_file()
File "/Users/xxx/w2j/venv/lib/python3.9/site-packages/w2j/wiz.py", line 150, in check_note_file
raise FileNotFoundError(f'找不到 note 文件 {self.note_file}!')
FileNotFoundError: 找不到 note 文件 /Users/xxx/.wiznote/[email protected]/data/notes/{3d1bd3e5-b664-41b4-9af8-32dfd36e1b27}!
这里Joplin的web clipper的token变长了是因为不小心升级到最新版发生的变化。 01.Inbox是我的wiz笔记的第一个目录,后面的目录试过也不行,结果都差不多。
另外,查看了~/w2j/w2j.log是个空文件。
不急回复,谢谢任何意见~
-l
参数的说明在这里:Convert the location of WizNote, e.g. /My Notes/. If you use the --all parameter, then skip --location parameter.
log file 指的的是 ~/w2j 文件夹下面的 w2j.log 文件。
wiz 同步的 log 没啥用的。