Demographic Data Analyzer Project, Can't Find The Console I Believe

Hello, I finished the theoretical part and now I’m doing the projects but I have tehnical problems or I don’t understand what to do, I open Gitpod, write code but I can’t run it to see the results, basically I tap Run Python File but it doesn’t show me anything, what am I doing wrong ? Same with the commands in the terminal, I’m not getting any response back, it only shows if I have a problem of writing in the code.

Hi. Can you please link to the challenge you are doing.

https://freecodecam-boilerplate-kg1e4nlp8qv.ws-eu120.gitpod.io

In Jupyter I can interact with the code and run it, print it, but here in Gitpod nothing seems to work, just coding blind

execute the code writing python3 main.py in the terminal, or maybe py or python instead of python3

you will get the output from the tests

I get an x and when i put my curos on it it sais : Command executed 1 min ago, took 806ms and failed. gitpod /workspace/boilerplate-demographic-data-analyzer (main) $ python3 main.py
Traceback (most recent call last):
File “/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/pandas/core/indexes/base.py”, line 3802, in get_loc
return self._engine.get_loc(casted_key)
File “pandas/_libs/index.pyx”, line 138, in pandas._libs.index.IndexEngine.get_loc
File “pandas/_libs/index.pyx”, line 165, in pandas._libs.index.IndexEngine.get_loc
File “pandas/_libs/hashtable_class_helper.pxi”, line 5745, in pandas._libs.hashtable.PyObjectHashTable.get_item
File “pandas/_libs/hashtable_class_helper.pxi”, line 5753, in pandas._libs.hashtable.PyObjectHashTable.get_item
KeyError: ‘race_count’

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File “main.py”, line 6, in
demographic_data_analyzer.calculate_demographic_data()
File “/workspace/boilerplate-demographic-data-analyzer/demographic_data_analyzer.py”, line 9, in calculate_demographic_data
race_count = df[“race_count”].value_counts()
File “/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/pandas/core/frame.py”, line 3807, in getitem
indexer = self.columns.get_loc(key)
File “/workspace/.pyenv_mirror/user/current/lib/python3.8/site-packages/pandas/core/indexes/base.py”, line 3804, in get_loc
raise KeyError(key) from err
KeyError: ‘race_count’
it did run this code but doesnt help

do you have the right libraries installed?

you have not yet shared your code with us so we can’t check those things

https://freecodecam-boilerplate-kg1e4nlp8qv.ws-eu120.gitpod.io

i shared it. i dont know if i have the libraries installed, i just tap on the link for the project on freecocecamp and it opens the project in gitpod for me to complete it

so i dont install anything, i work only on what freecodecamp gave me

that is not a link we can access, you will need to share a snapshot of your workspace for us to be able to access it

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.