zrong / wiz2joplin

Migrate from WizNote to Joplin.
GNU General Public License v3.0
92 stars 21 forks source link

json.decoder.JSONDecodeError: Expecting value #14

Open szwss opened 2 years ago

szwss commented 2 years ago

wiznote

image

I used the privatization deployment of wiz

joplin

image

python Python 3.10.1 (main, Dec 6 2021, 22:25:40) [Clang 13.0.0 (clang-1300.0.29.3)] on darwin Type "help", "copyright", "credits" or "license" for more information.

use command

w2j -o ~/w2j -w ~/.wiznote -u user@**.com -t ***token***  -n 192.168.0.110 -p 8088 -a

error

Please read [/Users/***user***/w2j/w2j.log] to check the conversion states.
Traceback (most recent call last):
  File "/Users/***user***/.virtualenvs/python_test/bin/w2j", line 8, in <module>
    sys.exit(main())
  File "/Users/***user***/.virtualenvs/python_test/lib/python3.10/site-packages/w2j/__init__.py", line 69, in main
    ad.sync_note_by_location(args.location, args.location_children)
  File "/Users/***user***/.virtualenvs/python_test/lib/python3.10/site-packages/w2j/adapter.py", line 577, in sync_note_by_location
    self.sync_folders()
  File "/Users/***user***/.virtualenvs/python_test/lib/python3.10/site-packages/w2j/adapter.py", line 431, in sync_folders
    jf = self.jda.post_folder(title=l2f.title)
  File "/Users/***user***/.virtualenvs/python_test/lib/python3.10/site-packages/w2j/joplin.py", line 282, in post_folder
    data = resp.json()
  File "/Users/***user***/.virtualenvs/python_test/lib/python3.10/site-packages/httpx/_models.py", line 742, in json
    return jsonlib.loads(self.content.decode(encoding), **kwargs)
  File "/usr/local/Cellar/python@3.10/3.10.1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
  File "/usr/local/Cellar/python@3.10/3.10.1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
  File "/usr/local/Cellar/python@3.10/3.10.1/Frameworks/Python.framework/Versions/3.10/lib/python3.10/json/decoder.py", line 355, in raw_decode
    raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

修改为 python 3.9.9 报错依旧

··· ... File "/usr/local/Cellar/python@3.9/3.9.9/Frameworks/Python.framework/Versions/3.9/lib/python3.9/json/decoder.py", line 355, in raw_decode raise JSONDecodeError("Expecting value", s, err.value) from None json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)

···

holoword commented 2 years ago

wiznoteX 似乎不能离线使用了,这个库的逻辑是通过将本地文件转换到joplin中完成迁移,而没有本地文件的wiznoteX似乎没法这么做。

zrong commented 2 years ago

我没有在你提供的这个版本中测试过……