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

Closed
casidiablo opened this issue Nov 8, 2024 · 4 comments
Closed
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

juftin added a commit that referenced this issue Nov 27, 2024
juftin added a commit that referenced this issue Nov 27, 2024
github-actions bot added a commit that referenced this issue Nov 27, 2024
# [v1.4.1](v1.4.0...v1.4.1) (2024-11-27)

## 🐛 Bug Fixes
- [`bef2428`](bef2428)  category length (Issues: [`#127`](#127))

[skip ci]
@juftin
Copy link
Owner

juftin commented Nov 27, 2024

This issue is resolved in lunchable 1.4.1 - thanks for the patience!

@juftin juftin closed this as completed Nov 27, 2024
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