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

Metadata: Increase size of projection and color profile fields to 40 characters #1830

Closed
avdv opened this issue Dec 22, 2021 · 6 comments
Closed
Assignees
Labels
bug Something isn't working released Available in the stable release

Comments

@avdv
Copy link

avdv commented Dec 22, 2021

Hi.

What does not work as expected?

While indexing my photos, I get a lot of these error messages:

Error 1406: Data too long for column 'file_color_profile' at row 1 in Neu2/converted/P1030036.jpg

How can we reproduce it?

Steps to reproduce the behavior:

  1. Go to 'Library'
  2. Click on 'Start' to start indexing
  3. Click on 'Library / Errors'
  4. See error

What behavior do you expect?

I expected that these files could be indexed.

Can you provide us with example files for testing or screenshots?

What version you are using?

PhotoPrism 211215-93b26f19-Linux-x86_64 (docker image)

Any other helpful information?

The output from exiftool -a -u -g1 P1030036.jpg, regarding the ICC profile:

---- ICC_Profile ----
Device Mfg Desc                 : Rawtherapee
Profile Description             : RT_sRGB gamma sRGB(IEC61966 equivalent) 
Device Model Desc               : RTsRGB
Media White Point               : 0.95016 1 1.08842
Red Matrix Column               : 0.43585 0.22238 0.01392
Blue Matrix Column              : 0.14302 0.06059 0.71385
Green Matrix Column             : 0.38533 0.71704 0.09712
Red Tone Reproduction Curve     : (Binary data 8204 bytes, use -b option to extract)
Green Tone Reproduction Curve   : (Binary data 8204 bytes, use -b option to extract)
Blue Tone Reproduction Curve    : (Binary data 8204 bytes, use -b option to extract)
Profile Copyright               : No copyright Rawtherapee -IEC61966 equivalent
Media Black Point               : 0 0 0

I suppose the string from "Profile Description" is what gets written to the file_color_profile column?

@avdv avdv added the bug Something isn't working label Dec 22, 2021
@lastzero
Copy link
Member

What MySQL / MariaDB Version do you use?

@avdv
Copy link
Author

avdv commented Dec 22, 2021

From image "mariadb:10.6": 10.6.5-MariaDB-1:10.6.5+maria~focal

@lastzero
Copy link
Member

Interesting, shouldn't happen obviously. The description string is longer than expected and the sanitize function doesn't seem to shorten it. Did you run a preview / development version previously?

As a workaround, you can manually increase the column size in the files database table. Going to provide a fix after Christmas.

@avdv
Copy link
Author

avdv commented Dec 22, 2021

Interesting, shouldn't happen obviously. The description string is longer than expected and the sanitize function doesn't seem to shorten it. Did you run a preview / development version previously?

No, fresh install of the stable version as of yesterday.

As a workaround, you can manually increase the column size in the files database table. Going to provide a fix after Christmas.

Thank you ! ❤️

@lastzero lastzero self-assigned this Dec 22, 2021
@avdv
Copy link
Author

avdv commented Dec 22, 2021

FTR, I ran:

alter table files modify column file_color_profile varchar(64);

and indexing the files worked now 😃
This is what the contents of the color profile information looks like in the UI:
image
Notice the small discrepancy to the output from exiftool - it is missing the right paren:

RT_sRGB gamma sRGB(IEC61966 equivalent)
RT_sRGB gamma sRGB(IEC61966 equivalent

Maybe that's caused by some sort of sanitizing or an error in parsing the information in the first place?

@lastzero lastzero changed the title Bug: MySQL Error 1406: Data too long for column 'file_color_profile' Metadata: Data too long for column 'file_color_profile' Jan 2, 2022
@lastzero lastzero added the in-progress Somebody is working on this label Jan 3, 2022
@lastzero
Copy link
Member

lastzero commented Jan 3, 2022

Due to a typo, the length of the string was not limited. Should be fixed with this. Max length has also been increased from 32 to 40 characters. We'll build a Development Preview for testing later today.

@lastzero lastzero added please-test Ready for acceptance test and removed in-progress Somebody is working on this labels Jan 3, 2022
@lastzero lastzero changed the title Metadata: Data too long for column 'file_color_profile' Metadata: Increase size of projection and color profile fields to 40 characters Jan 3, 2022
@graciousgrey graciousgrey added released Available in the stable release and removed please-test Ready for acceptance test labels Jan 7, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working released Available in the stable release
Projects
Status: Release 🌈
Development

No branches or pull requests

3 participants