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

Bad request "0.833" is not a number #2531

Open
aloisdg opened this issue Feb 7, 2025 · 2 comments
Open

Bad request "0.833" is not a number #2531

aloisdg opened this issue Feb 7, 2025 · 2 comments
Labels
good first issue suitable for new contributors UI issues concerning the User Interface

Comments

@aloisdg
Copy link

aloisdg commented Feb 7, 2025

URL: https://fr.liberapay.com/~1640839/tip
Method: POST
Referer: b'https://fr.liberapay.com/~1640839/tip'
User-Agent: b'Mozilla/5.0 (X11; Linux x86_64; rv:135.0) Gecko/20100101 Firefox/135.0'
Cookies: session=[43 bytes]; __stripe_mid=[42 bytes]; csrf_token=[32 bytes]
IP address: 2a01:e34:ec1e:2880:e01d:71b4:f43b:a529 (FR)
Time: 2025-02-07 16:29:51.646271+00:00
Response code: 400
Response message: '"0.833" n\'est pas un nombre valide.'
User: <Participant #10803 'alois'>
Locale: fr_FR
Website version: 781
Traceback:
  state_chain.py:315 (loop)
  pando/state_chain.py:128 (render_response)
  aspen/http/resource.py:141 (render)
  aspen/simplates/simplate.py:140 (render_for_type)
  www/%username/tip.spt:67 (<module>)
  liberapay/i18n/base.py:363 (parse_money_amount)

Maybe related to #1696

I think is is either related to the usage of the "." in a culture with the "," for decimal or maybe linked to a three decimals number.

I may try to fix it if you want.

@aloisdg
Copy link
Author

aloisdg commented Feb 7, 2025

well well well

8.33 is working.

It may be linked to the format_money function.

@Changaco
Copy link
Member

Changaco commented Feb 8, 2025

Excessively precise monetary amounts aren't allowed.

What needs to be done to close this issue is to improve the error message.

@Changaco Changaco added good first issue suitable for new contributors UI issues concerning the User Interface labels Feb 28, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
good first issue suitable for new contributors UI issues concerning the User Interface
Development

No branches or pull requests

2 participants