Problems with main release #162
Replies: 4 comments 1 reply
-
Didn't find a solution. Used the Ruby API instead. |
Beta Was this translation helpful? Give feedback.
-
I think the problem with your error handling is that you try to access
Looking at your example code, I suggest you try it like this:
The "inner" try/except can be removed I think. |
Beta Was this translation helpful? Give feedback.
-
This is not my "real" code. This was just an attempt to narrow down the problem case. The actual problem still remains, no matter where I handle the exception. I have tried the various combinations of exception catching, but the problem is still this: Why do the error occur? Anyhow, this problem is not of any relevance to me any more. As mentioned in my comment, I have solved my specific problem by using the Ruby API. I would have deleted the post, but that seems to not be possible. |
Beta Was this translation helpful? Give feedback.
-
The release is: |
Beta Was this translation helpful? Give feedback.
-
This is from a crude program. It is meant to run complete one time only, so it doesn't need to run smoothly or be "perfect".
Extracted and relevant Python code. Python is not my "native" programming language. I'm using v.2.7.1 of the client API package.
(PyCharm 2024.2.3, Python 3.11.9)
The master.main_release.year works for most of the releases, but then, Bham! I get the error (full trace see below)
I have tried to safe guard for None value of both master, master.main_release and master.main_release.year with try...except,
but the program still crashes. For all I know, there may be something fishy with the release data in Discogs, but I don't see how I can circumvent that. ???
The strange thing is that when I wrote this code for a trial run a year ago, this was not a problem.
TRACE:
Beta Was this translation helpful? Give feedback.
All reactions