Skip to content

Conversation

@TheNetworkGuy
Copy link

Since the project is now version 2, the package should also be imported from version 2 :)

@TheNetworkGuy
Copy link
Author

I've updated the code since i got a crash using get_article():


    producer = re.sub(color_regex, "", str(article_details[1]["markdown"]))
                                           ~~~~~~~~~~~~~~~~~~^^^^^^^^^^^^
KeyError: 'markdown'

After looking at the code i noticed that the code assumes a key for all products while that might not always be the case. For example with Banana's with ID s1016186 in country_code "NL". I've made a change so that it has a fallback so an empty string should there be no clear manufacturer defined.

@TheNetworkGuy TheNetworkGuy changed the title Fixes tiny typo in the readme Readme typo and get_article crash fix May 24, 2025
@codesalatdev codesalatdev added bug Something isn't working documentation Improvements or additions to documentation labels May 25, 2025
@codesalatdev
Copy link
Owner

Interesting that there are products without a producer...

Anyway, fully valid. Thanks for the PR!

@codecov
Copy link

codecov bot commented May 25, 2025

Codecov Report

Attention: Patch coverage is 0% with 1 line in your changes missing coverage. Please review.

Project coverage is 68.28%. Comparing base (3816f4c) to head (e63ede2).
Report is 2 commits behind head on main.

Files with missing lines Patch % Lines
src/python_picnic_api2/client.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@           Coverage Diff           @@
##             main      #12   +/-   ##
=======================================
  Coverage   68.28%   68.28%           
=======================================
  Files           4        4           
  Lines         227      227           
=======================================
  Hits          155      155           
  Misses         72       72           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@codesalatdev codesalatdev merged commit 09c1620 into codesalatdev:main May 25, 2025
3 of 4 checks passed
@TheNetworkGuy
Copy link
Author

Thanks @codesalatdev ! Looking forward to a new package version so that other users won;t have to deal with this issue anymore :)

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

Labels

bug Something isn't working documentation Improvements or additions to documentation

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants