Skip to content

Conversation

@dharit-tan
Copy link
Contributor

Description

This was breaking purchases on local dev.

Error:

{"level": "ERROR", "msg": "Task index_payment_router[b6fcc1b2-8273-4ae9-906d-5406486bff1c] raised unexpected: AttributeError(\"'NoneType' object has no attribute 'get'\")\nTraceback (most recent call last):\n  File \"/usr/lib/python3.11/site-packages/celery/app/trace.py\", line 477, in trace_task\n    R = retval = fun(*args, **kwargs)\n                 ^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.11/site-packages/celery/app/trace.py\", line 760, in __protected_call__\n    return self.run(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/app/packages/discovery-provider/src/utils/prometheus_metric.py\", line 57, in wrapper\n    raise e\n  File \"/app/packages/discovery-provider/src/utils/prometheus_metric.py\", line 30, in wrapper\n    result = func(*args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^\n  File \"/app/packages/discovery-provider/src/tasks/index_payment_router.py\", line 1076, in index_payment_router\n    raise e\n  File \"/app/packages/discovery-provider/src/tasks/index_payment_router.py\", line 1068, in index_payment_router\n    process_payment_router_txs()\n  File \"/app/packages/discovery-provider/src/tasks/index_payment_router.py\", line 1009, in process_payment_router_txs\n    process_payment_router_tx_details(\n  File \"/app/packages/discovery-provider/src/tasks/index_payment_router.py\", line 824, in process_payment_router_tx_details\n    process_route_instruction(\n  File \"/app/packages/discovery-provider/src/tasks/index_payment_router.py\", line 758, in process_route_instruction\n    memo, geo_metadata = parse_route_transaction_memos(\n                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/app/packages/discovery-provider/src/tasks/index_payment_router.py\", line 262, in parse_route_transaction_memos\n    city = geo_data.get(\"city\")\n           ^^^^^^^^^^^^\nAttributeError: 'NoneType' object has no attribute 'get'", "timestamp": "2024-08-08 19:03:16,582", "service": "worker", "otelSpanID": "0", "otelTraceID": "0", "otelServiceName": "discovery-provider", "data": {"hostname": "celery@5107fbc8bdc9", "id": "b6fcc1b2-8273-4ae9-906d-5406486bff1c", "name": "index_payment_router", "exc": "AttributeError(\"'NoneType' object has no attribute 'get'\")", "traceback": "Traceback (most recent call last):\n  File \"/usr/lib/python3.11/site-packages/celery/app/trace.py\", line 477, in trace_task\n    R = retval = fun(*args, **kwargs)\n                 ^^^^^^^^^^^^^^^^^^^^\n  File \"/usr/lib/python3.11/site-packages/celery/app/trace.py\", line 760, in __protected_call__\n    return self.run(*args, **kwargs)\n           ^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/app/packages/discovery-provider/src/utils/prometheus_metric.py\", line 57, in wrapper\n    raise e\n  File \"/app/packages/discovery-provider/src/utils/prometheus_metric.py\", line 30, in wrapper\n    result = func(*args, **kwargs)\n             ^^^^^^^^^^^^^^^^^^^^^\n  File \"/app/packages/discovery-provider/src/tasks/index_payment_router.py\", line 1076, in index_payment_router\n    raise e\n  File \"/app/packages/discovery-provider/src/tasks/index_payment_router.py\", line 1068, in index_payment_router\n    process_payment_router_txs()\n  File \"/app/packages/discovery-provider/src/tasks/index_payment_router.py\", line 1009, in process_payment_router_txs\n    process_payment_router_tx_details(\n  File \"/app/packages/discovery-provider/src/tasks/index_payment_router.py\", line 824, in process_payment_router_tx_details\n    process_route_instruction(\n  File \"/app/packages/discovery-provider/src/tasks/index_payment_router.py\", line 758, in process_route_instruction\n    memo, geo_metadata = parse_route_transaction_memos(\n                         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^\n  File \"/app/packages/discovery-provider/src/tasks/index_payment_router.py\", line 262, in parse_route_transaction_memos\n    city = geo_data.get(\"city\")\n           ^^^^^^^^^^^^\nAttributeError: 'NoneType' object has no attribute 'get'\n", "args": "[]", "kwargs": "{}", "description": "raised unexpected", "internal": false}}

How Has This Been Tested?

audius-cmd purchase-track works now

@changeset-bot
Copy link

changeset-bot bot commented Aug 8, 2024

⚠️ No Changeset found

Latest commit: 9b9de5d

Merging this PR will not cause a version bump for any packages. If these changes should not result in a new version, you're good to go. If these changes should result in a version bump, you need to add a changeset.

This PR includes no changesets

When changesets are added to this PR, you'll see the packages that this PR includes changesets for and the associated semver types

Click here to learn what changesets are, and how to add one.

Click here if you're a maintainer who wants to add a changeset to this PR

Copy link
Member

@raymondjacobson raymondjacobson left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

thanks 🙏

@dharit-tan dharit-tan merged commit 8cd3d6c into main Aug 8, 2024
@dharit-tan dharit-tan deleted the rt-geo branch August 8, 2024 19:33
audius-infra pushed a commit that referenced this pull request Aug 9, 2024
[876e321] [QA-1459] Fix 0087_fix_slugs_with_slash.sql migration (#9411) Raymond Jacobson
[c34cd83] Record Track Downloads via Entity Manager (#9103) Marcus Pasell
[d38870a] Small repairer clean up (#9405) Michelle Brier
[8cd3d6c] Payment router exception for when no geo_data found in memo (#9404) Reed
[53bf3e2] [PAY-3321][PAY-3333] Add network cut feature flag and update staking bridge and payment router addresses (#9393) Saliou Diallo
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants