Closed Bug 1623757 Opened 5 years ago Closed 5 years ago

Error when initializing glean on Python 3.8 (Win64)

Categories

(Data Platform and Tools :: Glean: SDK, defect, P1)

defect

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: wlach, Assigned: wlach)

References

Details

Attachments

(1 file)

+++ This bug was initially created as a clone of Bug #1623587 +++

Running mozregression's work-in-progress glean integration on my Windows installation (win64), I'm seeing the following error:

C:\Users\IEUser\mozregression>python gui\build.py run
uic'ing mozregui/ui\mainwindow.ui -> mozregui/ui\mainwindow.py
Executing `'C:\Users\IEUser\AppData\Local\Programs\Python\Python38\python.exe' mozregression-gui.py`
Process Process-1:
Traceback (most recent call last):
  File "C:\Users\IEUser\AppData\Local\Programs\Python\Python38\lib\multiprocessing\process.py", line 315, in _bootstrap
    self.run()
  File "C:\Users\IEUser\AppData\Local\Programs\Python\Python38\lib\multiprocessing\process.py", line 108, in run
    self._target(*self._args, **self._kwargs)
  File "c:\users\ieuser\mozregression\mozregression\telemetry.py", line 22, in _send_telemetry_ping
    Glean.initialize(
  File "C:\Users\IEUser\AppData\Local\Programs\Python\Python38\lib\site-packages\glean\glean.py", line 135, in initialize
    cls._initialize_core_metrics()
  File "C:\Users\IEUser\AppData\Local\Programs\Python\Python38\lib\site-packages\glean\glean.py", line 353, in _initialize_core_metrics
    sysinfo = hardware.get_system_information()
  File "C:\Users\IEUser\AppData\Local\Programs\Python\Python38\lib\site-packages\glean\hardware.py", line 99, in get_system_information
    model = get_value("NAME")
  File "C:\Users\IEUser\AppData\Local\Programs\Python\Python38\lib\site-packages\glean\hardware.py", line 93, in get_value
    if lines < 3:
TypeError: '<' not supported between instances of 'list' and 'int'

Code in question is here: https://github.com/mozilla/mozregression/pull/569/files#diff-49bcfe4626b1e9ef30bc322d528dcf07R14

Any thoughts? The same code works just fine on my Mac.

Attached file GitHub Pull Request

I think this is just a python 3.8 incompatibility.

[1,2] < 3 works fine on python 3.7, but throws the same exception on 3.8

https://github.com/mozilla/glean/blob/4ee44a2333a0174ed44079c27788d26b88c2bdc6/glean-core/python/glean/_hardware.py#L93

Assignee: nobody → wlachance
Priority: P3 → P1
Whiteboard: [telemetry:glean.rs:m?]
Summary: Error when initializing glean on Win64 → Error when initializing glean on Python 3.8 (Win64)
Status: NEW → RESOLVED
Closed: 5 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: