Skip to content

Error Handling - Getting UserId is reference before asignment error #17

@BlackViper3

Description

@BlackViper3

Hi,

I was trying to create a client to Gracenote API and I was getting this error.

G:\Workspace\SongRecommender\pygn.py in register(clientID)
     97 
     98 
---> 99         return userID
    100 #*****************************************************************************************************************************************
    101 # Added by Fabian in order to cover the Rhythm API

UnboundLocalError: local variable 'userID' referenced before assignment

Later, I found that the response to the query was having an error attribute.
ErrorPygn

Shouldn't the library handle this in pygn.py#97 with an else?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions