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

JSONDecodeError when downloading tar exclude or exporting files #50

Closed
ShellyYBlack opened this issue Feb 11, 2022 · 8 comments
Closed

Comments

@ShellyYBlack
Copy link

Hello! When I attempt to either download a tar exclude file or export files, I get this error:

Traceback (most recent call last): File "br_processor.py", line 1117, in File "br_processor.py", line 990, in main File "export.py", line 60, in export_files File "export.py", line 99, in _load_from_json File "json/__init__.py", line 293, in load File "json/__init__.py", line 346, in loads File "json/decoder.py", line 337, in decode File "json/decoder.py", line 355, in raw_decode json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) [8361] Failed to execute script 'br_processor' due to unhandled exception!

I'm using release candidate 0.3.1 and working with the same files which led to that other issue you recently fixed.

@tw4l
Copy link
Member

tw4l commented Feb 12, 2022

Thanks, Shelly! Sounds like I introduced a regression with the other fix. I'll take a look and get out a second release candidate with a fix shortly.

@tw4l
Copy link
Member

tw4l commented Feb 14, 2022

@ShellyYBlack Try this new release candidate when you have a chance and let me know if it works better for you: https://github.com/bulk-reviewer/bulk-reviewer/releases/tag/v0.3.1-rc2. You may need to create a new session from your existing reports, since I modified how the decoding works at a few points.

Thanks!

@ShellyYBlack
Copy link
Author

Many thanks, Tessa! I did have to create a new session. (When I used a previous session, I got the same JSONDecodeError when exporting files or creating the tar exclude list.) There were a couple of new errors using rc2 with the new session.

Creating the tar exclude file

The first time I did this, I got this message:

Unable to create tar exclude file /Users/borndigital/Desktop/19db9518-0909-463e-b8a1-c304800e2b91_tar_exclude.txt See bulk-reviewer.log for details.

The log showed this:

2022-02-18 13:13:57,793 - INFO - Running script in file export mode. JSON file: /Users/borndigital/bulk-reviewer/19db9518-0909-463e-b8a1-c304800e2b91_temp.json. Destination: /Users/borndigital/Desktop/19db9518-0909-463e-b8a1-c304800e2b91_tar_exclude.txt.
2022-02-18 13:14:00,459 - ERROR - Unable to create tar exclude file /Users/borndigital/Desktop/19db9518-0909-463e-b8a1-c304800e2b91_tar_exclude.txt. Details: 'ascii' codec can't encode characters in position 161-170: ordinal not in range(128)

I then dismissed all features except one, and when I attempted to create the tar exclude list, it was successful.

Exporting files

I tried exporting private files, and got this message:

Private files exported to directory /Users/borndigital/Desktop. The following files encountered errors: /Users/borndigital/born_digital/19db9518-0909-463e-b8a1-c304800e2b91/logical/Old hard disk back up/holding/QED/Productivity/Butorphanol chapter/analgesia references.doc. See Bulk Reviewer log for details.

Here are the log details:

2022-02-18 13:41:06,637 - INFO - Running script in file export mode. JSON file: /Users/borndigital/bulk-reviewer/19db9518-0909-463e-b8a1-c304800e2b91_temp.json. Destination: /Users/borndigital/Desktop.
2022-02-18 13:41:07,195 - ERROR - Error copying file /Users/borndigital/born_digital/19db9518-0909-463e-b8a1-c304800e2b91/logical/Old hard disk back up/holding/QED/Back up usb/System/Apps/285E6953-BF3C-4445-9376-3FE5D7F645B2/signupshield-pm-sandisk-v04_05_15_00.u3p: [Errno 2] No such file or directory: '/Users/borndigital/born_digital/19db9518-0909-463e-b8a1-c304800e2b91/logical/Old hard disk back up/holding/QED/Back up usb/System/Apps/285E6953-BF3C-4445-9376-3FE5D7F645B2/signupshield-pm-sandisk-v04_05_15_00.u3p'
2022-02-18 13:41:07,195 - INFO - Files with PII copied to /Users/borndigital/Desktop
2022-02-18 13:41:07,196 - INFO - Created export README file /Users/borndigital/Desktop/_BulkReviewer_README.txt
2022-02-18 13:41:07,196 - INFO - Export complete

I also tried exporting cleared files, and this was the error in the log:

LOG DETAILS where the Error copying file appeared repeatedly:
2022-02-18 11:45:47,635 - ERROR - Error copying file /Users/borndigital/born_digital/19db9518-0909-463e-b8a1-c304800e2b91/logical/Seagate Backup Plus Drive (E)/xray talk/xray CD/Dear Ms Glover.doc: [Errno 2] No such file or directory: '/Users/borndigital/born_digital/19db9518-0909-463e-b8a1-c304800e2b91/logical/Seagate Backup Plus Drive (E)/xray talk/xray CD/Dear Ms Glover.doc'
2022-02-18 11:45:47,635 - INFO - Cleared files copied to /Users/borndigital/Desktop
2022-02-18 11:45:47,636 - WARNING - Unable to create export README file /Users/borndigital/Desktop/_BulkReviewer_README.txt. Details: 'ascii' codec can't encode characters in position 79-88: ordinal not in range(128)
2022-02-18 11:45:47,636 - INFO - Export complete

I hope I've described all of this clearly!

@tw4l
Copy link
Member

tw4l commented Feb 26, 2022

Thanks Shelly! I'm having some health issues but should hopefully be able to look into this again next week.

@ShellyYBlack
Copy link
Author

Thanks for the update @tw4l and take care!

@tw4l
Copy link
Member

tw4l commented Aug 7, 2022

Hi @ShellyYBlack - apologies for the long delay on this one but I have a new release candidate that I think should resolve this issue if you'd like to test: https://github.com/bulk-reviewer/bulk-reviewer/releases/tag/v0.3.1-rc3

@ShellyYBlack
Copy link
Author

Thank you @tw4l! I tested creating the exclude file and exporting files successfully. I should note, though, that I tested using new files. (I no longer had access to the files I used when encountering the errors in the previous release.)

@tw4l
Copy link
Member

tw4l commented Aug 20, 2022

That's excellent @ShellyYBlack - thank you for testing! I will cut a new 0.3.1 release ASAP that will functionally be the same as v0.3.1-rc3 except for the version number.

@tw4l tw4l closed this as completed Aug 20, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants