question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Screen class not working on ev3dev stretch

See original GitHub issue

I am getting the following error with the recently released stretch package:

>>> import ev3dev.ev3 as ev3
>>> s = ev3.Screen()
>>> s.clear()
>>> s.update()
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/usr/lib/python3/dist-packages/ev3dev/core.py", line 3320, in update
    self.mmap[:] = self._img.tobytes("raw", "1;IR")
IndexError: mmap slice assignment is wrong size

It seems the same error prevents openrobertalab service from working:

$ journalctl -n 100
Oct 28 10:08:34 ev3dev openrobertalab[1992]: INFO:roberta:--- starting ---
Oct 28 10:08:34 ev3dev openrobertalab[1992]: INFO:roberta.lab:python path: /usr/bin:/usr/lib/python35.zip:/usr/lib/python3.5:/usr/lib/python3.5/plat-arm-linux-gnueabi:/usr/lib/python3.5/lib-
Oct 28 10:08:34 ev3dev openrobertalab[1992]: INFO:roberta.lab:status changed: disconnected
Oct 28 10:08:38 ev3dev openrobertalab[1992]: Traceback (most recent call last):
Oct 28 10:08:38 ev3dev openrobertalab[1992]:   File "/usr/bin/openrobertalab", line 41, in <module>
Oct 28 10:08:38 ev3dev openrobertalab[1992]:     main()
Oct 28 10:08:38 ev3dev openrobertalab[1992]:   File "/usr/bin/openrobertalab", line 36, in main
Oct 28 10:08:38 ev3dev openrobertalab[1992]:     service = Service('/org/openroberta/Lab1')
Oct 28 10:08:38 ev3dev openrobertalab[1992]:   File "/usr/lib/python3/dist-packages/roberta/lab.py", line 88, in __init__
Oct 28 10:08:38 ev3dev openrobertalab[1992]:     self.hal.clearDisplay()
Oct 28 10:08:38 ev3dev openrobertalab[1992]:   File "/usr/lib/python3/dist-packages/roberta/ev3.py", line 179, in clearDisplay
Oct 28 10:08:38 ev3dev openrobertalab[1992]:     self.lcd.update()
Oct 28 10:08:38 ev3dev openrobertalab[1992]:   File "/usr/lib/python3/dist-packages/ev3dev/core.py", line 3320, in update
Oct 28 10:08:38 ev3dev openrobertalab[1992]:     self.mmap[:] = self._img.tobytes("raw", "1;IR")
Oct 28 10:08:38 ev3dev openrobertalab[1992]: IndexError: mmap slice assignment is wrong size
Oct 28 10:08:38 ev3dev openrobertalab[1992]: INFO:roberta:--- done ---

This is on the latest snapshot (snapshot-ev3dev-stretch-ev3-generic-2017-10-24.img.xz). The stretch-compatible ev3dev version is there, since leds are working:

>>> import ev3dev.ev3 as ev3
>>> ev3.Leds.all_off()

Issue Analytics

  • State:closed
  • Created 6 years ago
  • Comments:12 (12 by maintainers)

github_iconTop GitHub Comments

1reaction
ddemidovcommented, Oct 29, 2017

Fixed by #424 (develop, aka v2) and #425 (stretch-stable, aka v1). Also pushed the updated packages for the stretch-stable version.

0reactions
ddemidovcommented, Oct 28, 2017

I believe that is because we had to do inversion.

Read more comments on GitHub >

github_iconTop Results From Across the Web

new display driver in kernel 4.14.x · Issue #455 - GitHub
I just released a new ev3dev kernel on ev3dev-stretch that updates from 4.9.x to 4.14.x. ... Also, the Screen class is now called...
Read more >
Upgrading from ev3dev-jessie (library v1) to ev3dev-stretch ...
In version 1 of the library, instantiating a device such as a motor or sensor would always succeed without an error. To see...
Read more >
Troubleshoot - EV3dev Python - Google Sites
To solve the problem for all the scripts in the folder that you have open in VS Code, that folder should contain a...
Read more >
python-ev3dev Documentation - Read the Docs
Upgrading from ev3dev-jessie (library v1) to ev3dev-stretch (library v2) . ... but the fonts for ev3dev2.display do not work.
Read more >
Getting Started with ev3dev
microSDXC is not supported on the EV3. All cards larger than 32GB will not work with the EV3! ... Download ev3dev-stretch for LEGO...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found