Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SyntaxError: invalid syntax #1

Open
Echtze1t opened this issue Nov 10, 2017 · 15 comments
Open

SyntaxError: invalid syntax #1

Echtze1t opened this issue Nov 10, 2017 · 15 comments

Comments

@Echtze1t
Copy link

Hi Austin,

I'd really like to use your script and I have almost no clue what I'm doing, but I've installed everything as per your instructions and now get an error when executing the file as follows:

File "discord_xbl_status.py", line 40
def init(self, config: XblPresenceMonitorConfig, event_loop=None):
^
SyntaxError: invalid syntax

Did I do something wrong and if so, how can it be fixed?

@TangoBloom
Copy link

did you edit any of the text in that file at all?

@Echtze1t
Copy link
Author

Echtze1t commented Dec 4, 2017

No, only the text in the config file.

@TangoBloom
Copy link

Hm. What version of python are you on? I just got this running a few minutes ago and it worked fine. Though I did have to modify that file a bit to remove a deprecated method further down. Check out my fork

@Echtze1t
Copy link
Author

Echtze1t commented Dec 4, 2017

Python v3.4

Downloaded your fork. Now I get this:

File "discord_xbl_status.py", line 7
< !DOCTYPE html>
^
SyntaxError: invalid syntax

@TangoBloom
Copy link

What version of python?

@Echtze1t
Copy link
Author

Echtze1t commented Dec 4, 2017

I'm confused. Package manager says: Python v3.4

But when I run python it says: 2.7.6

Any yes, I know you need 3.4+ for the script to work. So the error is obviously not the script itself. My bad.

@TangoBloom
Copy link

Check your PATH variable. Make sure it's pointing to the newer python version

@Echtze1t
Copy link
Author

Echtze1t commented Dec 4, 2017

Should running "python3 discord_xbl_status.py" also work? Checking the PATH variable now.

@TangoBloom
Copy link

It could, not terribly sure on that one.

@Echtze1t
Copy link
Author

Echtze1t commented Dec 4, 2017

Strange. No matter if I use your old or your new file, the error message is now a different one (< !DOCTYPE html>)

@Echtze1t
Copy link
Author

Echtze1t commented Dec 4, 2017

Man, I give up. Thanks for your help. I get the same error in Windows (Python 3.6) and Ubuntu (Python 3.4) now.

I desperately wanted this work, since its the only script of this kind I could find anywhere. So sad it's all so complicated :(

@TangoBloom
Copy link

Sorry I couldn't help more. I'm not quite sure what the issue is.

@Echtze1t
Copy link
Author

Echtze1t commented Dec 4, 2017

Is the script working for you in both Windows and Linux (what distro do you use)?

@TangoBloom
Copy link

I'm on Windows 10. I just ran it through the command line.

@mconnervt
Copy link

@Zorpix after updating the deprecated method did you run into any other issues? I get an unhandled event discord.gateway Unhandled event USER_CONNECTIONS_UPDATE, and it doesn't appear that my discord status ever updates. It looks like it is able to successfully log into my Discord as well as pull my Xbox information from the API, but something with syncing the Discord information fails. Unfortunately I haven't seen any information about that specific event in the discord.py documentation.

image

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants