Code Monkey home page Code Monkey logo

Comments (3)

fvaleye avatar fvaleye commented on May 23, 2024

Hello @AceWang377 πŸ‘‹,

Thank you for your message!

Sure, I can help you with that. However, I'll need some more information to provide a detailed answer:

  1. The version of Tracarbon
  2. The full stack trace, I would need to see the error message you're receiving. If you're running a command or a script that results in an error, please provide the entire output.
  3. Regarding the hardware, could you please specify what information you're interested in? Are you asking about the server specifications (like CPU, RAM, etc.) or something else?
  4. As for where it's running, are you asking about the physical location of the server or the type of environment (like production, staging, etc.)?

If you could provide these details, I'd be able to assist you better.

from tracarbon.

AceWang377 avatar AceWang377 commented on May 23, 2024

Thank you very much for replying to my message. I'm just learning this stuff so I'm sorry I have some very basic questions for you. My computer is the MacBook M1 version, and yesterday I entered the variable environment TRACARBON_CO2SIGNAL_API_KEY=", then pip installed some necessary packages, and downloaded the software Developer Portal by Blobr. Then run all the code in your code package. py file is also not an error. But when I finally ran tracarbon run in the terminal, an error occurred:
(pythonProject) wangzixuandemacbook@wangzixuandeMACBOOKdeMacBook-Air pythonProject % tracarbon run
2023-10-18 14:36:15.136 | INFO Tracarbon CLI started.
Traceback (most recent call last):

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/bin/tracarbon", line 8, in
sys.exit(main())

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/lib/python3.10/site-packages/tracarbon/cli/init.py", line 146, in main
app()

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/lib/python3.10/site-packages/tracarbon/cli/init.py", line 138, in run
run_metrics(

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/lib/python3.10/site-packages/tracarbon/cli/init.py", line 121, in run_metrics
with tracarbon:

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/lib/python3.10/site-packages/tracarbon/builder.py", line 48, in enter
self.start()

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/lib/python3.10/site-packages/tracarbon/builder.py", line 58, in start
self.exporter.start(interval_in_seconds=self.configuration.interval_in_seconds)

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/lib/python3.10/site-packages/tracarbon/exporters/exporter.py", line 136, in start
_run()

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/lib/python3.10/site-packages/tracarbon/exporters/exporter.py", line 129, in _run
asyncio.run(self._launch_all())

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/lib/python3.10/asyncio/base_events.py", line 646, in run_until_complete
return future.result()

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/lib/python3.10/site-packages/tracarbon/exporters/exporter.py", line 154, in _launch_all
await self.launch(metric_generator=metric_generator)

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/lib/python3.10/site-packages/tracarbon/exporters/stdout.py", line 17, in launch
async for metric in metric_generator.generate():

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/lib/python3.10/site-packages/tracarbon/general_metrics.py", line 30, in generate
energy_usage = await self.energy_consumption.get_energy_usage()

File "/Users/wangzixuandemacbook/.conda/envs/pythonProject/lib/python3.10/site-packages/tracarbon/hardwares/sensors.py", line 95, in get_energy_usage
return EnergyUsage(host_energy_usage=float(result))

ValueError: could not convert string to float: ''

1.Tracarbon version is 0.7.1
2. The error is as shown above
3/4. Please forgive my ignorance. I want to use this carbon footprint software to record the carbon emission index generated by my daily behaviour, and use this to check the carbon emission level in my area. Then after downloading the DEVERLOP software, I can directly use the map to see the average carbon emission level in my area, but I don't know if it can also record my carbon footprint.

Thank you again for taking the time to answer my question, and I look forward to hearing from you.

from tracarbon.

fvaleye avatar fvaleye commented on May 23, 2024

Thank you @AceWang377!
Could you please run this command in a terminal on your laptop:
/usr/sbin/ioreg -rw0 -c AppleSmartBattery
And send me the full output in text with the command used.

If the output is too big:
/usr/sbin/ioreg -rw0 -c AppleSmartBattery | grep BatteryData | grep -o '"AdapterPower"=[0-9]*'

I will take a look on why it fails on your Mac.

from tracarbon.

Related Issues (10)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    πŸ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. πŸ“ŠπŸ“ˆπŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❀️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.