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

Category name limit is 40 chars... but Lunch Money allows longer names #127

Open
casidiablo opened this issue Nov 8, 2024 · 3 comments
Open
Labels
triage This will looked at

Comments

@casidiablo
Copy link

  • lunchable version:
  • Python version:
  • Operating System:

Description

Got this error:

  File "/usr/local/lib/python3.12/site-packages/lunchable/models/categories.py", line 182, in get_categories
    CategoriesObject.model_validate(item) for item in categories
    ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
  File "/usr/local/lib/python3.12/site-packages/pydantic/main.py", line 551, in model_validate
    return cls.__pydantic_validator__.validate_python(
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
pydantic_core._pydantic_core.ValidationError: 1 validation error for CategoriesObject
name
  String should have at most 40 characters [type=string_too_long, input_value='Sporting events amusement parks and museums', input_type=str]
    For further information visit https://errors.pydantic.dev/2.7/v/string_too_long

What I Did

One of my categories has a long name in Lunch Money, which means they do support long cat names. But lunchable has a limit of 40 chars.

@github-actions github-actions bot added the triage This will looked at label Nov 8, 2024
@juftin
Copy link
Owner

juftin commented Nov 11, 2024

Ah, interesting. Their documentation lists a 40 character limit https://lunchmoney.dev/#categories

@casidiablo
Copy link
Author

Yeah, I will ask in their discord what their actual limit is. Or maybe I can just brute force it in the UI

@casidiablo
Copy link
Author

Tested in the UI. They support up to 100 chars.
Screenshot 2024-11-11 at 11 32 10 AM

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
triage This will looked at
Projects
None yet
Development

No branches or pull requests

2 participants