We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
The get_group_title function fails when the performers or albums are empty.
get_group_title
writing log to /Users/me/Downloads/dr.txt Traceback (most recent call last): File "/Users/me/Software/simple_dr_meter/./main.py", line 268, in <module> main() File "/Users/me/Software/simple_dr_meter/./main.py", line 145, in main write_log(f.write, dr_log_items, dr_mean) File "/Users/me/Software/simple_dr_meter/./main.py", line 54, in write_log group_name = get_group_title(group) ^^^^^^^^^^^^^^^^^^^^^^ File "/Users/me/Software/simple_dr_meter/./main.py", line 35, in get_group_title return f'{", ".join(group.performers)} — {", ".join(group.albums)}' ^^^^^^^^^^^^^^^^^^^^^^^^^^^ TypeError: sequence item 0: expected str instance, NoneType found
Perhaps a patch like the following one would be good enough:
def get_group_title(group: LogGroup): - return f'{", ".join(group.performers)} — {", ".join(group.albums)}' + if not (group.performers is None or group.albums is None): + return f'{", ".join(group.performers)} — {", ".join(group.albums)}' + return ""
The text was updated successfully, but these errors were encountered:
No branches or pull requests
The
get_group_title
function fails when the performers or albums are empty.Perhaps a patch like the following one would be good enough:
The text was updated successfully, but these errors were encountered: