Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

Statements must be separated by newlines or semicolons

I'm literally using the same code as the official Betfair Developer example, the only difference is that I'm putting the APP_KEY_HERE and SESSION_TOKEN data.

But unlike the site, Visual Studio Code is giving me an error and a crash in the terminal.

enter image description here

Terminal response:

line 11
    print json.dumps(json.loads(response.text), indent=3)
          ^
SyntaxError: invalid syntax

https://docs.developer.betfair.com/display/1smk3cen4v3lu3yomq5qye0ni/Getting+Started

enter image description here

What am I missing and what do I need to change to solve this problem?

like image 747
Digital Farmer Avatar asked Jan 21 '26 04:01

Digital Farmer


1 Answers

In python 3.x, you have to enclose the arguments in ().

print(json.dumps(json.loads(response.text), indent=3))

Donate For Us

If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!