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

"RecursionError: maximum recursion depth exceeded in comparison" #122

Closed
cwmoriarty opened this issue Dec 8, 2022 · 2 comments
Closed

Comments

@cwmoriarty
Copy link

cwmoriarty commented Dec 8, 2022

Seeing the following on a long-term search:


Parsing Mint Transactions |████████████████████████████████| 10000/10000
Matching Amazon Items with Orders |███████████████████████████████▌| 5220/5295Traceback (most recent call last):
  File "/usr/local/bin/mint-amazon-tagger-cli", line 8, in <module>
    sys.exit(main())
  File "/usr/local/lib/python3.10/site-packages/mintamazontagger/cli.py", line 118, in main
    results = tagger.create_updates(
  File "/usr/local/lib/python3.10/site-packages/mintamazontagger/tagger.py", line 154, in create_updates
    updates, unmatched_orders = get_mint_updates(
  File "/usr/local/lib/python3.10/site-packages/mintamazontagger/tagger.py", line 240, in get_mint_updates
    amazon.associate_items_with_orders(orders, items, itemProgress)
  File "/usr/local/lib/python3.10/site-packages/mintamazontagger/amazon.py", line 201, in associate_items_with_orders
    for item_groupings in algorithm_u(oid_items, len(orders)):
  File "/usr/local/lib/python3.10/site-packages/mintamazontagger/algorithm_u.py", line 20, in f
    for v in f(mu - 1, nu - 1, (mu + sigma) % 2, n, a):
  File "/usr/local/lib/python3.10/site-packages/mintamazontagger/algorithm_u.py", line 20, in f
    for v in f(mu - 1, nu - 1, (mu + sigma) % 2, n, a):
  File "/usr/local/lib/python3.10/site-packages/mintamazontagger/algorithm_u.py", line 20, in f
    for v in f(mu - 1, nu - 1, (mu + sigma) % 2, n, a):
  [Previous line repeated 991 more times]
  File "/usr/local/lib/python3.10/site-packages/mintamazontagger/algorithm_u.py", line 17, in f
    if mu == 2:
RecursionError: maximum recursion depth exceeded in comparison
@jprouty
Copy link
Owner

jprouty commented Jan 9, 2023

Ugh; sorry you ran into this! Tagger is trying to brute force determine which items from an order when into which shipment. I'll add some logic to catch this exception, as well as a timeout to prevent this from taking too long (I believe you have an old bug report something to this effect - might have been this same routine.)

@jprouty
Copy link
Owner

jprouty commented Jan 26, 2023

A fix to this issue will be in 1.61. Sorry for the delay, as I imagine this error was likely giving you repeated trouble (requiring manual effort to exclude the problematic order).

@jprouty jprouty closed this as completed Jan 26, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants