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

MicroPython doesn't support MethodType() from "types" module! #1956

Open
3 tasks done
GoToLoop opened this issue Jan 29, 2024 · 1 comment
Open
3 tasks done

MicroPython doesn't support MethodType() from "types" module! #1956

GoToLoop opened this issue Jan 29, 2024 · 1 comment
Labels
3rd party Errors coming from foreign projects we either enable or rely on needs-triage Issue needs triage type: bug Something isn't working

Comments

@GoToLoop
Copy link

GoToLoop commented Jan 29, 2024

Checklist

  • I added a descriptive title
  • I searched for other issues and couldn't find a solution or duplication
  • I already searched in Google and didn't find any good information or help

What happened?

When MethodType() is invoked MicroPython raises:

"TypeError: can't create 'bound_method' instances"

We can see that bug happen in file "best.py" inside function setup() on this link:
https://PyScript.com/@gotoloop/unicode-letters-test/v2

Besides swapping to Pyodide instead:
https://PyScript.com/@gotoloop/unicode-letters-test/v3

By chance I've found out about function partial() from "functools" module:
https://PyScript.com/@gotoloop/unicode-letters-test

But I still think MicroPython should fix MethodType(), although partial() seems to do exactly the same; whether more performant or not I dunno.

What browsers are you seeing the problem on? (if applicable)

Firefox, Chrome, Other

Console info

MicroPython exception: Traceback (most recent call last):
  File "<stdin>", line 67, in sketch
TypeError: can't create 'bound_method' instances

Additional Context

No response

@GoToLoop GoToLoop added needs-triage Issue needs triage type: bug Something isn't working labels Jan 29, 2024
@WebReflection
Copy link
Contributor

I think this bug would better be in MicroPython repository using the WebAssembly/PyScript - prefix as we're not working on MicroPython in here.

@WebReflection WebReflection added the 3rd party Errors coming from foreign projects we either enable or rely on label Jan 29, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3rd party Errors coming from foreign projects we either enable or rely on needs-triage Issue needs triage type: bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants