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

Non-string environment variables cause crash. #28

Closed
isTravis opened this issue May 18, 2018 · 2 comments
Closed

Non-string environment variables cause crash. #28

isTravis opened this issue May 18, 2018 · 2 comments

Comments

@isTravis
Copy link

This was first mentioned in #25, but that original issue had been resolved, so I am repeated this related, but separate issue here.

Thanks to @stevemorad for pointing out that environment variables can be used to set Thumbor conf values. I found that this works for string values, but not for int values, e.g. QUALITY.

I get an error when I set an environment variable with key QUALITY and value 95.

Here is the error I'm receiving.
screen shot 2018-04-24 at 10 14 28 am

And here is where the error originates from in PIL

Any suggestions on how to work around this? Or do I have to just manually set the value in thumbor.conf as you describe above?

@gsingh04
Copy link
Member

gsingh04 commented Aug 8, 2018

To use integer values, you need to set it in thumbor.conf. It seems thumbor allow_environment_variables() is not able to handle int data types and hence the error. I would recommend opening the issue with thumbor.

@shsenior
Copy link
Contributor

Version 3.0 resolves this issue.

thisismana added a commit to thisismana/serverless-image-handler that referenced this issue Jan 28, 2022
* bumped to latest, merged some updates from upstream

* - adapted for new key pattern `/$YEAR/$MONTH/$MEDIA_ID/` ignoring file name and always using `image.$EXT`
- roundCrops
- improved local development by fixing invoke.js and making the logger env-aware

* - adapted for new key pattern `/$YEAR/$MONTH/$MEDIA_ID/` ignoring file name and always using `image.$EXT`
- roundCrops
- improved local development by fixing invoke.js and making the logger env-aware
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

3 participants