Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Measure Raspberry Pi Energy #33

Open
hafizuriu opened this issue Feb 15, 2024 · 0 comments
Open

Measure Raspberry Pi Energy #33

hafizuriu opened this issue Feb 15, 2024 · 0 comments

Comments

@hafizuriu
Copy link

Hi, is it possible to measure energy of raspberry pi. I tried it but failed to measure.

It shows an error-

Traceback (most recent call last):
  File "/home/master-pi/test.py", line 7, in <module>
    main()
  File "/home/master-pi/.local/lib/python3.11/site-packages/pyJoules/energy_meter.py", line 298, in wrapper_measure
    handler.process(energy_meter.get_trace())
                    ^^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/master-pi/.local/lib/python3.11/site-packages/pyJoules/energy_meter.py", line 160, in get_trace
    return self._generate_trace()
           ^^^^^^^^^^^^^^^^^^^^^^
  File "/home/master-pi/.local/lib/python3.11/site-packages/pyJoules/energy_meter.py", line 169, in _generate_trace
    domains = self._get_domain_list()
              ^^^^^^^^^^^^^^^^^^^^^^^
  File "/home/master-pi/.local/lib/python3.11/site-packages/pyJoules/energy_meter.py", line 166, in _get_domain_list
    return reduce(operator.add, [device.get_configured_domains() for device in self.devices])
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
TypeError: reduce() of empty iterable with no initial value
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant