NebraLtd / hm-config

Helium Miner Config Container
https://nebra.io/hnt
MIT License
13 stars 20 forks source link

AttributeError: When using gi.repository you must not import static modules like "gobject". Please change all occ... #200

Open sentry-io[bot] opened 2 years ago

sentry-io[bot] commented 2 years ago

Sentry Issue: HM-CONFIG-32

AttributeError: When using gi.repository you must not import static modules like "gobject". Please change all occurrences of "import gobject" to "from gi.repository import GObject". See: https://bugzilla.gnome.org/show_bug.cgi?id=709183
(4 additional frame(s) were not displayed)
...
  File "__main__.py", line 66, in start
    FIRMWARE_VERSION
  File "/opt/gatewayconfig/gatewayconfig_app.py", line 45, in __init__
    self.shared_state
  File "/opt/gatewayconfig/processors/bluetooth_services_processor.py", line 12, in __init__
    super().__init__()
  File "/opt/lib/cputemp/service.py", line 62, in __init__
    self.mainloop = GObject.MainLoop()
  File "__init__.py", line 69, in __getattr__
    raise AttributeError(_static_binding_error)
shawaj commented 1 year ago

We only have:

https://github.com/NebraLtd/hm-config/blob/c6caddfe8cda4d00cd041c59ebd25a7b93cfdd5a/lib/cputemp/bletools.py#L23-L27

And

https://github.com/NebraLtd/hm-config/blob/2e01248542445a9eeb67ac95ede7c4e65f816bea/lib/cputemp/service.py#L32-L36

Which handle both.

So think this issue can be closed

shawaj commented 1 year ago

Unless @NebraLtd/developers has a different opinion?