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

amazonorders.exception.AmazonOrdersEntityError #28

Closed
4 tasks done
mkhazhinsky opened this issue Dec 21, 2024 · 2 comments
Closed
4 tasks done

amazonorders.exception.AmazonOrdersEntityError #28

mkhazhinsky opened this issue Dec 21, 2024 · 2 comments
Labels
bug Something isn't working stale Issue will be closed automatically if no further activity occurs

Comments

@mkhazhinsky
Copy link

Acknowledgements

  • I have written a descriptive issue title
  • I have searched Issues to see if the bug has already been reported
  • I have searched Stack Overflow to ensure the issue I'm experiencing has not already been discussed
  • If possible, I have enabled debug mode and am attaching relevant console logs and HTML files

Operating System

Linux

Python Version

3.10.12

amazon-orders Version

3.2.1

Describe the Bug

The following error is being generated when running

orders = amazon_orders.get_order_history(year=2024, full_details=True)

File "/tmp/code/amazon.py", line 389, in
main(sys.argv[1:])
File "/tmp/code/amazon.py", line 165, in main
orders = amazon_orders.get_order_history(year=year, full_details=True)
File "/usr/local/lib/python3.10/dist-packages/amazonorders/orders.py", line 76, in get_order_history
order: Order = self.config.order_cls(order_tag, self.config)
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/order.py", line 40, in init
self.shipments: List[Shipment] = clone.shipments if clone else self._parse_shipments()
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/order.py", line 91, in _parse_shipments
shipments: List[Shipment] = [self.config.shipment_cls(x, self.config)
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/order.py", line 91, in
shipments: List[Shipment] = [self.config.shipment_cls(x, self.config)
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/shipment.py", line 30, in init
self.items: List[Item] = self._parse_items()
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/shipment.py", line 56, in _parse_items
items: List[Item] = [self.config.item_cls(x, self.config)
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/shipment.py", line 56, in
items: List[Item] = [self.config.item_cls(x, self.config)
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/item.py", line 30, in init
self.title: str = self.safe_simple_parse(selector=self.config.selectors.FIELD_ITEM_TITLE_SELECTOR,
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/parsable.py", line 149, in safe_simple_parse
return self.safe_parse(self.simple_parse, selector=selector, **kwargs)
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/parsable.py", line 54, in safe_parse
return parse_function(**kwargs)
File "/usr/local/lib/python3.10/dist-packages/amazonorders/entity/parsable.py", line 133, in simple_parse
raise AmazonOrdersEntityError(
amazonorders.exception.AmazonOrdersEntityError: When building Item, field for selector ["[data-component='itemTitle']", '.yohtmlc-item a', '.yohtmlc-product-title'] was None, but this is not allowed.

Code did not change. Used to work fine few days ago.

Steps to Reproduce

Use amazon_orders.get_order_history command

Expected Behavior

No response

@mkhazhinsky mkhazhinsky added the bug Something isn't working label Dec 21, 2024
@alexdlaird
Copy link
Owner

We'll need to see the HTML of the page to understand why this is failing, please follow the instructions from the fourth bullet point to provide an example of the page that is failing.

Copy link

This issue is stale because it has remained open with no further activity on it. Comment with additional context or the issue will be closed automatically. Thank you for your contribution!

@github-actions github-actions bot added the stale Issue will be closed automatically if no further activity occurs label Dec 29, 2024
@github-actions github-actions bot closed this as not planned Won't fix, can't repro, duplicate, stale Jan 6, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working stale Issue will be closed automatically if no further activity occurs
Projects
None yet
Development

No branches or pull requests

2 participants