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

Problem on line 63 probably through 65 #7

Open
hlejeune opened this issue Apr 11, 2017 · 11 comments
Open

Problem on line 63 probably through 65 #7

hlejeune opened this issue Apr 11, 2017 · 11 comments

Comments

@hlejeune
Copy link

hlejeune commented Apr 11, 2017

python3 spotify-dl.py —track 6Qx4oBvRoIrttTcl6UDfk9 --dl youtube
  File "spotify-dl.py", line 63
    print "Videos:\n", "\n".join(videos), "\n"
                    ^
SyntaxError: invalid syntax

So here's the error message trying to download a track with Python 3, before I had an issue recognizing bs4 which still happen on Python 2.7

I tried debugging this one changing commas for concatenation via + and + " "
Didn't work. Neither did it change " " to ' ' around \n

@hlejeune
Copy link
Author

Hi again,

I solved the error by changing all print statement to have parenthesis so it's compatible Python 3.
However urllib2 needs to be changed to 3, and StringIO gives an error as well it need to be from io module not stringIO in Python 3.

I am still not seeing any download even with credentials, I get > printed on the next lines when i launch my command ?

@invicnaper
Copy link
Owner

You can create a Python3 version ? and send it to me so I can try it out .

@hlejeune
Copy link
Author

Hi,
I have another question why is playlist not working?

here's my version on a gist:
(https://gist.github.com/hlejeune/3fcb083c72faf1be4a40b75f308d0d32)

@invicnaper
Copy link
Owner

not supported yet, i'll make a major version soon

@invicnaper
Copy link
Owner

You want to add the python3 version on the README ? so if someone want to use it

@hlejeune
Copy link
Author

Sure did you test it. I get http error often with track though i suspect my internet connection

1 similar comment
@hlejeune
Copy link
Author

Sure did you test it. I get http error often with track though i suspect my internet connection

@hlejeune
Copy link
Author

I didn't mean to close the issue. How was your test?

@hlejeune hlejeune reopened this Apr 14, 2017
@invicnaper
Copy link
Owner

You're still using a Python2 version of BS4 on your code

@invicnaper
Copy link
Owner

invicnaper commented Apr 14, 2017

You should remove urllib while we're using urllib3. and mention that we should use "2to3 -w bs4" for using bs4 with python3. You can create a pull request adding "how to install it for Python3" in the README.md and the source code

@EsmailELBoBDev2
Copy link

hmm, im using python3.8 and getting same error...

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

No branches or pull requests

3 participants