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

Decoding error when loading zone names #78

Open
natke opened this issue Apr 22, 2023 · 1 comment
Open

Decoding error when loading zone names #78

natke opened this issue Apr 22, 2023 · 1 comment

Comments

@natke
Copy link

natke commented Apr 22, 2023

Fresh clone and package install on Windows. Python 3.9.

(Had to downgrade pandas to 1.5.3 due to json normalize issue. Fix is in PR #77)

Run python my_experiment.py

Gives the following error

(exp-impact-test) c:\Users\nakersha\Develop\code\misc\experiment-impact-tracker\examples>python my_experiment.py
loading region bounding boxes for computing carbon emissions region, this may take a moment...
 100.00% 454/454... rate=773.76 Hz, eta=0:00:00, total=0:00:02
Done!
Traceback (most recent call last):
  File "c:\Users\nakersha\Develop\code\misc\experiment-impact-tracker\examples\my_experiment.py", line 6, in <module>
    from experiment_impact_tracker.compute_tracker import ImpactTracker
  File "C:\Users\nakersha\Miniconda3\envs\exp-impact-test\lib\site-packages\experiment_impact_tracker\compute_tracker.py", line 25, in <module>
    from experiment_impact_tracker.cpu.intel import get_rapl_power
  File "C:\Users\nakersha\Miniconda3\envs\exp-impact-test\lib\site-packages\experiment_impact_tracker\cpu\intel.py", line 13, in <module>
    from experiment_impact_tracker.utils import *
  File "C:\Users\nakersha\Miniconda3\envs\exp-impact-test\lib\site-packages\experiment_impact_tracker\utils.py", line 15, in <module>
    from experiment_impact_tracker.emissions.constants import PUE
  File "C:\Users\nakersha\Miniconda3\envs\exp-impact-test\lib\site-packages\experiment_impact_tracker\emissions\constants.py", line 77, in <module>
    ZONE_NAMES = _load_zone_names()
  File "C:\Users\nakersha\Miniconda3\envs\exp-impact-test\lib\site-packages\experiment_impact_tracker\emissions\constants.py", line 50, in _load_zone_names
    x = json.load(f)
  File "C:\Users\nakersha\Miniconda3\envs\exp-impact-test\lib\encodings\cp1252.py", line 23, in decode
    return codecs.charmap_decode(input,self.errors,decoding_table)[0]
UnicodeDecodeError: 'charmap' codec can't decode byte 0x8d in position 14279: character maps to <undefined>

(exp-impact-test) c:\Users\nakersha\Develop\code\misc\experiment-impact-tracker\examples>
pip list

arrow                     1.2.3
beautifulsoup4            4.12.2
bootstrapped              0.0.2
bs4                       0.0.1
certifi                   2022.12.7
charset-normalizer        3.1.0
click                     8.1.3
colorama                  0.4.6
contourpy                 1.0.7
cycler                    0.11.0
decorator                 5.1.1
deepdiff                  6.3.0
experiment-impact-tracker 0.1.8
filelock                  3.12.0
fonttools                 4.39.3
future                    0.18.3
geocoder                  1.38.1
geographiclib             2.0
geopy                     2.3.0
idna                      3.4
importlib-resources       5.12.0
Jinja2                    3.1.2
joblib                    1.2.0
kiwisolver                1.4.4
MarkupSafe                2.1.2
matplotlib                3.7.1
mpmath                    1.3.0
networkx                  3.1
numpy                     1.24.3
ordered-set               4.1.0
packaging                 23.1
pandas                    1.5.3
Pillow                    9.5.0
pip                       23.0.1
progiter                  1.3.0
psutil                    5.9.5
py-cpuinfo                9.0.0
PyLaTeX                   1.4.1
pyparsing                 3.0.9
python-dateutil           2.8.2
pytz                      2023.3
ratelim                   0.1.6
requests                  2.28.2
scipy                     1.10.1
seaborn                   0.12.2
setuptools                66.0.0
shapely                   2.0.1
six                       1.16.0
soupsieve                 2.4.1
sympy                     1.11.1
torch                     2.0.0
typing_extensions         4.5.0
tzdata                    2023.3
ujson                     5.7.0
urllib3                   1.26.15
wheel                     0.38.4
zipp                      3.15.0
@natke
Copy link
Author

natke commented Apr 24, 2023

I see the lib does not support Windows. Will try on Linux. Any plans to support Windows?

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