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

Multiple Barcodes Found leads to crash #3

Open
claybarrett opened this issue Jan 21, 2021 · 5 comments
Open

Multiple Barcodes Found leads to crash #3

claybarrett opened this issue Jan 21, 2021 · 5 comments

Comments

@claybarrett
Copy link
Contributor

Using code downloaded today:

ALERT - multiple barcodes found. Using only first barcode of 2
...
OSError: [WinError 123] The filename, directory name, or volume label syntax is incorrect: 'D:\image processing\OKLAimagesAllBatch1and2\problems\OKLA2660_BARCODES[2660|102660].jpg'

Led to script crashing instead of renaming based one of the found barcodes.

@jbest jbest closed this as completed in 16c35f0 Feb 1, 2021
@claybarrett
Copy link
Contributor Author

This no longer crashes, alert says:
ALERT - multiple barcodes found. Using first barcode of 2 : 103003

But the file name comes out as:
OKLA103003_BARCODES[103003,104542].jpg

@jbest jbest reopened this Feb 1, 2021
@jbest
Copy link
Owner

jbest commented Feb 1, 2021

OK, I forgot about what would happen when a prefix is specified. I'll add the prefix in the alert as well. Do you think the prefix should be added in the list of detected barcodes in the filename?: OKLA103003_BARCODES[OKLA103003,OKLA104542].jpg

@claybarrett
Copy link
Contributor Author

I guess the result I expected from that alert was a file named OKLA103003. Then the technician could find that image based on the alert, verify it had a second barcode, and then copy the image set and manually rename them to the other barcode.

But I also thought we were single capturing these... I'm finding double captures leading to this result
OKLA103003_BARCODES[103003,104542].jpg OKLA103003_BARCODES[103003,104542]_A

I don't think either approach is wrong/right more/less work really. Just want to decide a recommended procedure and document support for that.

@jbest
Copy link
Owner

jbest commented Feb 1, 2021

OK, I think Ill fix the alert message but keep this behaviour (one input image, multiple barcodes = one renamed image) as the default until I make a way to generate new images for multiple barcodes found. I don't want to do that until we have a way to specify legit barcode patterns (in a CLI switch or config file) because I don't want to make new files for barcodes that are old/deaccessioned or mis-read.

@claybarrett
Copy link
Contributor Author

This batch took a long time to complete for some reason. Having just cleaned this set, I actually prefer having both barcodes in the filename because it's faster/safer/simpler to just rename the images. It skips the looking at the image step and trying to remember the digits long enough to type them in.

It could even be OKLA[103003,104542].jpg and work just as well I think.

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