ntoll / uflash

A module and command to easily flash Python onto the BBC's micro:bit device.
http://micropython.org/
MIT License
101 stars 27 forks source link

I can't import log #83

Open lopezsolerluis opened 1 year ago

lopezsolerluis commented 1 year ago

Hi! :)

My problem is that when I upload the firmware with uflash, and try to import the log module, I get this error:

>>> import log
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
ImportError: no module named 'log'

However, some modules load with no problem, like import radio or import neopixel.

Am I doing something wrong? Thank you very much in advance!

ntoll commented 1 year ago

There is no log module in the MicroBit version of MicroPython. :disappointed:

Rather, you should go "old school" and just print("some message") and watch the USB serial connection for the output.

lopezsolerluis commented 1 year ago

Excuse me, but there is: https://microbit-micropython.readthedocs.io/en/v2-docs/log.html

In fact, you can import log using micro:bit Python Editor

Am I missing something?

ntoll commented 1 year ago

Nope... I'm the one missing something here. :smile:

It appears that they've added a new log module. @carlosperate do you have any information on this..?

ntoll commented 1 year ago

@lopezsolerluis the solution would be to update the firmware. It happens that @carlosperate works for micro:bit (and helps out here too). So let's see what he says, and hopefully we can patch it.

lopezsolerluis commented 1 year ago

@ntoll Thank you very much!!! :)