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

Unit test and getTracks fail #7

Open
cici opened this issue Nov 19, 2016 · 4 comments
Open

Unit test and getTracks fail #7

cici opened this issue Nov 19, 2016 · 4 comments

Comments

@cici
Copy link

cici commented Nov 19, 2016

getTracks fails with the following error:

ERROR: testTracks (main.PyLyricsTest)

Traceback (most recent call last):
File "tests.py", line 17, in testTracks
self.assertIsInstance(albums[0].tracks(),list)
File "/Users/cici/Downloads/PyLyrics-1.1.0/PyLyrics/functions.py", line 38, in tracks
return PyLyrics.getTracks(self)
File "/Users/cici/Downloads/PyLyrics-1.1.0/PyLyrics/functions.py", line 69, in getTracks
songs =[Track(song.text,album,album.artist()) for song in currentAlbum.findNext('songs').findAll('item')]
UnboundLocalError: local variable 'currentAlbum' referenced before assignment

@cici
Copy link
Author

cici commented Nov 19, 2016

This is from downloading the source from pypi. The unit tests run when cloned from github.

@dyelax
Copy link

dyelax commented Jan 4, 2017

Having the same issue. Would love to see this fixed!

@efrainvalles
Copy link

Instsalling from pip is still present. Works fine cloning from trunk

@nyck33
Copy link

nyck33 commented May 19, 2019

For a 2 CD album like "Until the End of Time" by Tupac, all tracks on the second CD have the track number of the last track on the first CD:

0. 2Pacalypse Now
1. Strictly 4 My N.I.G.G.A.Z...
2. Thug Life - Volume 1
3. Me Against the World
4. All Eyez on Me
5. The Don Killuminati: The Seven Day Theory
6. R U Still Down? (Remember Me)
7. Greatest Hits
8. Pac and Biggie You Never Heard
9. Still I Rise
10. The Here After
11. Until the End of Time
12. Better Dayz
13. Tupac: Resurrection
14. Live
15. Loyal to the Game
16. Pac's Life
C:\ProgramData\Anaconda3\lib\site-packages\bs4\__init__.py:181: UserWarning: No parser was explicitly specified, so I'm using the best available HTML parser for this system ("lxml"). This usually isn't a problem, but if you run this code on another system, or in a different virtual environment, it may use a different parser and behave differently.

The code that caused this warning is on line 12 of the file PyLyricsTest.py. To get rid of this warning, change code that looks like this:

 BeautifulSoup(YOUR_MARKUP})

to this:

 BeautifulSoup(YOUR_MARKUP, "lxml")

  markup_type=markup_type))
16. Ballad Of A Dead Soulja
16. Fuck Friendz
16. Lil' Homies
16. Let Em Have It
16. Good Life
16. Letter 2 My Unborn
16. Breathin
16. Happy Home
16. All Out
16. Fuckin Wit The Wrong Nigga
16. Thug N U Thug N Me (Remix)
16. Everything They Owe
16. Until The End Of Time
16. M.O.B.
16. World Wide Mob Figgaz
16. Big Syke Interlude
16. My Closest Roaddogz
16. Niggaz Nature Remix
16. When Thugz Cry
16. U Don't Have 2 Worry
16. This Ain't Living
16. Why U Turn On Me?
16. Lastonesleft
16. Thug N U Thug N Me
16. Words 2 My First Born
16. Let Em Have It Remix
16. Runnin On E
16. When I Get Free
16. Until The End Of Time Time RP Remix

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

4 participants