-
Notifications
You must be signed in to change notification settings - Fork 2
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
can't import name TextIOWrapper #6
Comments
This is not a library designed for rp2040, it is recommended to use it on esp series development boards. There will be interpreter differences between different development boards. This is normal, but not sure if this method works on rp2040 it also means it will work on esp series. However, in fact, there are differences between StringIO and TextIOWrapper, but if your modification is available on rp2040 and has no obvious impact on other platforms after testing, you are welcome to submit a pull request. |
Thank you for the quick response. I'm a begginer learning as i go, so I don't feel confident recommending this fix to others. Doing a quick test it seems to work both on console and on file log, but I'll let more knowledgeable people decide. I hope you understand my perspective :) |
哈喽,我在esp32的ports上也有这个问题 |
你好,检查您的 mpy 版本,可能版本过新,API 发生了变化,或者版本过久,不支持这个 API,这个库已经很久不更新,可以参考一楼自己做一下修改 |
Hello, I'm trying to implement this library to handle logs in my project.
I copied the
__init__.py
and renamed it toulogger.py
, imported it in my main, tried to test following your examples but i get the error:By importing
StringIO
instead everything seems to be working correctly:I simply tried this replacement by looking at what the REPL gave available on io module and picking what seemed to be the most probable guess.
Please let me know if i implemented ulogger in a wrong way or if my fix is not appropriate
The text was updated successfully, but these errors were encountered: