Author Topic: Brickviewer 'object has no attribute' error  (Read 169 times)

bakalolo

  • Newbie
  • *
  • Posts: 2
    • View Profile
Brickviewer 'object has no attribute' error
« on: May 03, 2019, 02:47:52 »
Hi.


I 'm getting error messages when running bricker viewer with my IMU brick 2.0 connected.
Error message as followed and I made a screenshot attached.
Traceback (most recent call last):
  File "/usr/share/brickv/plugin_system/plugins/imu_v2/imu_v2_gl_widget.py", line 163, in initializeGL
    gl.glClearDepth(1.0)
AttributeError: 'QOpenGLFunctions_ES2' object has no attribute 'glClearDepth'

I have used the following terminal commands to install brick viewer in this exact order:

1. Install Brick Daemon

   $ sudo apt-get install libusb-1.0-0 libudev0 pm-utils

   $ wget http://download.tinkerforge.com/tools/brickd/linux/brickd_linux_latest_armhf.deb

   $ sudo dpkg -i brickd_linux_latest_armhf.deb


2.  Install Brick Viewer

(for python only)
   $ sudo apt-get install python3 python3-pyqt5 python3-pyqt5.qtopengl python3-serial

   $ wget http://download.tinkerforge.com/tools/brickv/linux/brickv_linux_latest.deb

   $ sudo dpkg -i brickv_linux_latest.deb

Please advise.  Thank you.


rtrbt

  • Administrator
  • Jr. Member
  • *****
  • Posts: 51
    • View Profile
Re: Brickviewer 'object has no attribute' error
« Reply #1 on: May 03, 2019, 12:09:33 »
Hi,
can you please try the attached version of Brick Viewer?

The problem seems to be, that the IMU 2.0 3D rendering uses the (very old) immediate mode, which is only supported by OpenGL, not OpenGLES. The Raspberry Pi does not support OpenGL, so we can't render the 3D model, which was not handled.

I will rewrite the rendering to use more modern OpenGL capabilities, which are also supported by OpenGLES. But for now, you can use the attached version, which disables the 3D rendering if only OpenGLES is available.

Thanks for reporting the bug,
Erik
« Last Edit: May 03, 2019, 12:11:14 by rtrbt »

rtrbt

  • Administrator
  • Jr. Member
  • *****
  • Posts: 51
    • View Profile
Re: Brickviewer 'object has no attribute' error
« Reply #2 on: May 10, 2019, 16:53:07 »
In Brick Viewer 2.4.3 the 3D rendering is working with OpenGLES (i.e. on the Raspberry Pi).

bakalolo

  • Newbie
  • *
  • Posts: 2
    • View Profile
Re: Brickviewer 'object has no attribute' error
« Reply #3 on: May 15, 2019, 01:49:30 »
2.4.3 fixed the issue didn't have to do anything else.  Thanks for help.