-
Notifications
You must be signed in to change notification settings - Fork 29
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
Sync failing - Process completed with exit code 1. #43
Comments
@bvendsel Can you run follow instructions on running the script through a Python terminal as shown here to generate a local json file of highlights that were failed. You can check the highlights to see if there is anything strange. Based on the error code (400 bad request), It seems to me that there are some highlights that might break the Readwise restrictions. For instance, Readwise sets limits to the number of characters per highlight. |
@e-alizadeh I did what you asked and got an empty json file back. I'm fairly certain it isn't a highlight as i recently archived off my old library and started fresh as part of a new job. Unless that could have caused a problem? |
@bvendsel Based on your description, there seems to be something wrong with your new setup, because I haven't updated the library, nor I see a Readwise API change that may impact the library. Just a curiosity question, is there by any chance a change in the following items that are used as environment variables?
Based on the log in your screenshot "0 Zotero items are retrieved.", the issue most likely is due to a change in Zotero settings. |
There shouldn't be but there is always a chance. Thanks for your help. I'll
just clear everything out and start again. Too useful not to have working
:)
…On Sun, Apr 23, 2023 at 9:04 PM Essi Alizadeh ***@***.***> wrote:
@bvendsel <https://github.com/bvendsel> Based on your description, there
seems to be something wrong with your new setup, because I haven't updated
the library, nor I see a Readwise API change that may impact the library.
Just a curiosity question, is there by any chance a change in the
following items that are used as environment variables?
- Readwise access token
- Zotero API key
- Zotero personal or group ID
—
Reply to this email directly, view it on GitHub
<#43 (comment)>,
or unsubscribe
<https://github.com/notifications/unsubscribe-auth/AALYCKCCQ55C7KVEH4APYYDXCX3UZANCNFSM6AAAAAAW6WWB2A>
.
You are receiving this because you were mentioned.Message ID:
***@***.***>
|
Hi, I'm having this same issue, but with this json file generated for failed items. It seems to be an issue with the author field? How can I identify which items are causing the issues? (json file changed to txt just to be able to upload) |
@alibrack I got a chance to look at this. The issue comes from the fact that I only export Responses from Readwise (
If you still have the issue I can update the code to export the error along with the highlight itself? |
That would be really helpful! I am still having the issue, yes. On Sep 24, 2023, at 1:04 PM, Essi Alizadeh ***@***.***> wrote:
@alibrack I got a chance to look at this. The issue comes from the fact that I only export Responses from Readwise (https://github.com/e-alizadeh/Zotero2Readwise/blob/142f8eb417da9e365d20ad391b25a3362b932f61/zotero2readwise/readwise.py#L71).
If you still have the issue I can update the code to export the error along with the highlight itself?
—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you were mentioned.Message ID: ***@***.***>
|
I am also affected by this problem. I am currently using Zotero2Readwise-Sync and in the Zotero to Readwise Automation phase I get the error "TypeError: unsupported operand type(s) for |: 'dict' and 'dict'". Important to underline that Zotero2Readwise-Sync worked without problem until last week or so. Here's the log: Run python run.py *** *** ***
python run.py *** *** ***
shell: /usr/bin/bash -e {0}
env:
pythonLocation: /opt/hostedtoolcache/Python/3.8.18/x64
PKG_CONFIG_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib/pkgconfig
Python_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x64
Python[2](https://github.com/ncarboni/Zotero2Readwise-Sync/actions/runs/12625808503/job/35178035782#step:6:2)_ROOT_DIR: /opt/hostedtoolcache/Python/[3](https://github.com/ncarboni/Zotero2Readwise-Sync/actions/runs/12625808503/job/35178035782#step:6:3).8.18/x64
Python3_ROOT_DIR: /opt/hostedtoolcache/Python/3.8.18/x6[4](https://github.com/ncarboni/Zotero2Readwise-Sync/actions/runs/12625808503/job/35178035782#step:6:4)
LD_LIBRARY_PATH: /opt/hostedtoolcache/Python/3.8.18/x64/lib
Retrieving ALL annotations from Zotero Database
It may take some time...
Traceback (most recent call last):
File "run.py", line 73, in <module>
zt2rw.run()
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/zotero2readwise/zt2rw.py", line [5](https://github.com/ncarboni/Zotero2Readwise-Sync/actions/runs/12625808503/job/35178035782#step:6:5)3, in run
zot_annots_notes = self.get_all_zotero_items()
File "/opt/hostedtoolcache/Python/3.8.18/x[6](https://github.com/ncarboni/Zotero2Readwise-Sync/actions/runs/12625808503/job/35178035782#step:6:6)4/lib/python3.8/site-packages/zotero2readwise/zt2rw.py", line 42, in get_all_zotero_items
items.extend(self.retrieve_all("annotation", self.since))
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/zotero2readwise/zt2rw.py", line 82, in retrieve_all
query = self.zotero_client.items(itemType={item_type}, since=since)
File "/opt/hostedtoolcache/Python/3.8.18/x64/lib/python3.8/site-packages/pyzotero/zotero.py", line 16[7](https://github.com/ncarboni/Zotero2Readwise-Sync/actions/runs/12625808503/job/35178035782#step:6:7), in wrapped_f
retrieved = self._retrieve_data(func(self, *args))
File "/opt/hostedtoolcache/Python/3.[8](https://github.com/ncarboni/Zotero2Readwise-Sync/actions/runs/12625808503/job/35178035782#step:6:8).18/x64/lib/python3.8/site-packages/pyzotero/zotero.py", line 460, in _retrieve_data
merged_params = params | self.url_params
TypeError: unsupported operand type(s) for |: 'dict' and 'dict'
Error: Process completed with exit code 1. edit: fixed with proposition on issue #83 |
The text was updated successfully, but these errors were encountered: