Data Analysis with Python Projects - Demographic Data Analyzer

Tell us what’s happening:
When I run my tests using Replit nothing happens. I’ve selected “use run command” and clicked Done, but when I paste my code into demographic_data_analyzer.py and hit the green run button, nothing comes up in the console (for other projects I’ve had messages that my code has failed or has passed etc.)

I can see that my CPU and RAM indicators in the Replit window are at full capacity - could this be the problem?

I haven’t posted my code as I don’t think the problem lies here. The only thing is that I read the CSV file off my computer (see below) - could this cause the issue?

df = pd.read_csv(
        "/home/domigmr/PersonalProjects/land_use/Europe/adult.data.csv")

I get results when I wrote the code using Jupyter Notebooks so I’m not sure.
Your code so far

Your browser information:

User Agent is: Mozilla/5.0 (X11; CrOS x86_64 14541.0.0) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/108.0.0.0 Safari/537.36

Challenge: Data Analysis with Python Projects - Demographic Data Analyzer

Link to the challenge:

You’ll have to post a link to your repl as it is impossible to debug from this information. It could be a dependency issue or something else. You should be reading the file (use a relative file name) from your repl when running on replit.

I’ve only had that error when I forgot to select “Use run command” and it tries to execute main.py - you’ll get nothing happening like you describe. But if you definitely did click “Use run command” then I have no idea. Did you already try starting importing the boilerplate to a new Repl?

Hi Jeremy,

Thanks for your comment. I edited my code to the below thinking that this would work but nothing.

df = pd.read_csv(
        "adult.data.csv")

Here is the link to my replit, does this work?
https://replit.com/join/thswwlpzge-dominicgoymour

Hiya,

Yeah I’ve created a couple of the different replit windows, none of them worked. I’m definitely sure I clicked on Use Run Command and Done before pasting my code in so I’m a bit stumped too.

@jeremy.a.gray @aburke1234 - hmm, now when I run the code I get the following:

Replit: Updating package configuration

--> python3 -m poetry lock --no-update
Resolving dependencies...

Writing lock file
--> python3 -m poetry install
Installing dependencies from lock file

Package operations: 3 installs, 2 updates, 0 removals

  • Updating six (1.16.0 -> 1.15.0)
  • Updating numpy (1.24.1 -> 1.18.5)
  • Installing python-dateutil (2.8.1)
  • Installing pytz (2020.1)

and then nothing happens.

I also just received this error:

    ERROR: Failed building wheel for numpy
  Failed to build numpy
  ERROR: Could not build wheels for numpy which use PEP 517 and cannot be installed directly
  

  at venv/lib/python3.10/site-packages/poetry/utils/env.py:1195 in _run
      1191│                 output = subprocess.check_output(
      1192│                     cmd, stderr=subprocess.STDOUT, **kwargs
      1193│                 )
      1194│         except CalledProcessError as e:
    → 1195│             raise EnvCommandError(e, input=input_)
      1196│ 
      1197│         return decode(output)
      1198│ 
      1199│     def execute(self, bin, *args, **kwargs):

exit status 1


Replit: Package operation failed.

but haven’t been able to replicate this.

Hi all,

I deleted poetry.lock and pyproject.toml and then ran the project again. Now my unit tests are working. Still have to work on some of the code though! never thought I’d be so happy to see a bunch of fails lol

thanks for your help