Cannot execute the python CLI program with prybar?

Question:
Hi guys,

I switched my python project to a new one with prybar. But I still cannot get my project to run. the Error states:

 python main.py buy
  File "<stdin>", line 1
    python main.py buy
           ^^^^
SyntaxError: invalid syntax

What is this stdin? line 1 starts with import I am doing?

Thanks for your help!

Repl link/Link to where the bug appears:
https://replit.com/@LoLoW1/SuperPy2

Screenshots, links, or other helpful context:
image

code snippet

Welcome to the forums, @LoLoW1!
If you are using the Python (with Prybar) template, then you won’t have to put python main.py in the console.

Hi RedCoder,

Thanks fo ryour fast reply. But even when I put in one of the commands ‘buy’ I get the same error…
any ideas for that?

Thanks!

Leoni

@LoLoW1 Try print(buy). Also could you check if buy defined?

Still the same:

print (buy)
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
NameError: name 'buy' is not defined

it is defenitly defined, as it was working great before Replit changed the whole python thing…

@LoLoW1 I looked through your code and it doesn’t seem that buy is defined. That is why you are getting the error when you type print(buy) in the console.

but I don’t understand why before it was working fine? what does the stdin error mean?

Aww wait, my bad! Try python main.py print(buy)

if you want to pass in arguments, run python main.py buy in the Shell.

2 Likes