Skip to content

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

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?

Activity

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

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