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

fix str length encoding #191

Merged
merged 1 commit into from
Feb 5, 2024
Merged

fix str length encoding #191

merged 1 commit into from
Feb 5, 2024

Conversation

kgrofelnik
Copy link
Contributor

Encountered an error while trying to make a transaction with a long string argument:

  File ".venv/lib/python3.11/site-packages/canoser/array_t.py", line 45, in check_value
    self.atype.check_value(item)
  File ".venv/lib/python3.11/site-packages/canoser/int_type.py", line 72, in check_value
    raise TypeError('value {} not in range {}-{}'.format(value, min, max))
TypeError: value 871 not in range 0-255

Traced the issue back to the encoding of string length.

@FrankC01
Copy link
Owner

FrankC01 commented Feb 5, 2024

Good catch

@FrankC01 FrankC01 merged commit 95c5736 into FrankC01:main Feb 5, 2024
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

Successfully merging this pull request may close these issues.

2 participants