Skip to content
New issue

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

Error when updating prices with custom rounding prices #7

Closed
rwillmann opened this issue Jul 26, 2019 · 1 comment
Closed

Error when updating prices with custom rounding prices #7

rwillmann opened this issue Jul 26, 2019 · 1 comment
Assignees
Labels
bug Something isn't working

Comments

@rwillmann
Copy link

Hello,

On a Windows 10 with Python 3.7.4, I got the error below when updating my stock price with custom rounding prices.

Traceback (most recent call last):
  File "C:\Users\Romain\Desktop\pymkm-master - Copie\pymkm-master\pymkm_app.py", line 379, in get_rounding_limit_for_rarity
    self.config['price_limit_by_rarity'][rarity.lower()])
KeyError: 'land'

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File ".\main.py", line 19, in <module>
    main()
  File ".\main.py", line 15, in main
    app.start()
  File "C:\Users\Romain\Desktop\pymkm-master - Copie\pymkm-master\pymkm_app.py", line 71, in start
    menu.show()
  File "C:\Users\Romain\Desktop\pymkm-master - Copie\pymkm-master\micro_menu.py", line 34, in show
    func(**kwargs)
  File "C:\Users\Romain\Desktop\pymkm-master - Copie\pymkm-master\pymkmapi.py", line 25, in wrapper
    return_value = func(*arg, **kwargs)
  File "C:\Users\Romain\Desktop\pymkm-master - Copie\pymkm-master\pymkm_app.py", line 77, in update_stock_prices_to_trend
    uploadable_json = self.calculate_new_prices_for_stock(api=self.api)
  File "C:\Users\Romain\Desktop\pymkm-master - Copie\pymkm-master\pymkm_app.py", line 345, in calculate_new_prices_for_stock
    article, api=self.api)
  File "C:\Users\Romain\Desktop\pymkm-master - Copie\pymkm-master\pymkm_app.py", line 362, in get_price_for_single_article
    article['idProduct'], article['product']['rarity'], article['isFoil'], language_id=article['language']['idLanguage'], api=self.api)
  File "C:\Users\Romain\Desktop\pymkm-master - Copie\pymkm-master\pymkm_app.py", line 387, in get_price_for_product
    rounding_limit = self.get_rounding_limit_for_rarity(rarity)
  File "C:\Users\Romain\Desktop\pymkm-master - Copie\pymkm-master\pymkm_app.py", line 381, in get_rounding_limit_for_rarity
    print(f"ERROR: Unknown rarity for {r}. Using default rounding.")
NameError: name 'r' is not defined
100% (1709 of 1709) |############################################################| Elapsed Time: 0:02:20 Time:  0:02:20

Best,

Romain

@rwillmann rwillmann changed the title Error when updating procis with custom rounding prices Error when updating prices with custom rounding prices Jul 26, 2019
@andli andli added the bug Something isn't working label Jul 26, 2019
@andli andli self-assigned this Jul 26, 2019
@andli andli closed this as completed in 63dcc58 Jul 26, 2019
@andli
Copy link
Owner

andli commented Jul 26, 2019

@rwillmann 1.0.5 is out now and should have fixed it. Sorry about that!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants