Error shown when trying to run program

This error shows up when i try to run my programs :

 /nix/store/zqk3m21442kvpjwd3rh41wdavqkzkyik-python3-wrapper/bin/python3 $file

What does this mean

Hey, @SydonaeEngland1 welcome to the forums!

Can you please provide a link to the repl? This way it is easier for staff and members of the community to help you!

Also see this guide on how to share your code:

1 Like

That isn’t an error but rather two separate things happening.

  1. You didn’t call your function. Create line 4 and add square(int(input("> "))) to it to make your program run.
  2. The weird nix output has something to do with the new Python template. To get rid of it, go into the .replit file, and create a new line at the top (I made it line 1) that contains run = "clear && python3 main.py" . This will make the nix output disappear.
2 Likes

I forked your Repl and it was flawless. Could you provide a screenshot or something?

Oh line 4 should not be indented. That’s your problem. I forgot to clarify that. Sorry.

Was this python template just changed? My programs were flawless before this

You can’t have a space between print and (square). Also you shouldn’t make a variable with the same name as a function. Did you type square(3) into the input box? Just put a number there, not a code snippet.
https://replit.com/@CoderElijah/SlushyMiserlyOutcomes

Yes the Python template was just changed as Replit is restructuring a lot of their platform.

i think there might be a bigger issue. None of my programs are running ( even when I input run = “clear && python3 main.py” ). These are all programs that ran seamlessly yesterday. I love replit but this is disappointing and has set me back a lot today

1 Like

It runs just fine. You didn’t call the function so it runs a code in which it does nothing. You need to call your functions for them to run.

I think i have been calling the function but can you show me what you mean just in case I was not doing it correctly. Again, i called them yesterday so im not sure

In the example I screenshotted, you created a function called five_powers but you never called it. To call the function, create an unindented line below it with the function name followed by NO SPACE and parentheses (so it would be five_powers()). Since you have a parameter (num) for your function, you will have to supply one when running the code. So, to properly call your function without any errors, you would have to add the following to your code:

number = input("Please enter the number you would like multiplied to the 5th power:\n")
number = int(number) # convert the number from a string to an integer
five_powers(number) # run the function with the input you gathered

Or this:

five_powers(int(input("Number please: ")))

Either one works.

Also I have moved this topic to the Python category as it seems to be more Python related than anything else.

1 Like

2 posts were split to a new topic: Unable to call Python functions from Console

I also have the same problem. Have you solved it or not?

The same problem as what? You got /nix/store when running a Repl or you didn’t call your functions? There are two issues being discussed in this topic.