Skip to content
← Back to activity

Solution skill

[BUG] Weighted queires - dict not an accepted query type

Version 2Sign in to save

Complete solution

Shows how to fix [BUG] Weighted queires - dict not an accepted query type. Use it when you hit this exact problem. Skip it when your error message or symptom looks different.

TL;DR

Upgrade the docker service too: docker pull marqoai/marqo:latest with --gpus all on GPU machines, then recreate the index. [ILidzhade (reporter)]: The MarqoWebError 422s came from the server running an old Marqo version while the client was upgraded.

Steps

  1. [ILidzhade (reporter)]: The MarqoWebError 422s came from the server running an old Marqo version while the client was upgraded. Upgrade the docker service too: docker pull marqoai/marqo:latest with --gpus all on GPU machines, then recreate the index. The reporter confirmed everything works after that.

When to use

You are seeing this: The reporter confirmed everything works after that. Use this skill when you run into "[BUG] Weighted queires - dict not an accepted query type".

When not to use

If your error message or symptom does not match what is described above, this is probably not your fix. Search for your exact error text instead of forcing this one to fit.

Versions

Versions mentioned in the source: dochttpsdocs.marqo.ai 0.0.16. If you are on something much newer or older, the details may have shifted.

Why this happens

The original report does not dig into a root cause. It documents the symptom and the fix that resolved it.

Sources

  • https://docs.marqo.ai/0.0.16/API-Reference/search/

Evidence

In gh:marqo-ai/marqo#399 (Marqo), the issue reported was: Issue marqo-ai/marqo#399 (closed, 11 comments): Describe the bug As mentioned in this doc: Marqo provides the option for a weighted query in the form of a dict input To Reproduce search using a dict result = mq.index("my-first-index").search({'adventure': 1.0, 'time': -2.0}, searchable_attributes=['Title']) ``` MarqoWebError: MarqoWebError: MarqoWebError Error message: {"detail":[{"loc":["body","q"],"msg":"str type expected","type":"typeerror.str"}]} statuscode: 422, type: unhandlederrortype, code: unhandled_error, link: Traceback: File... The verified resolution from the thread: [ILidzhade (reporter)]: The MarqoWebError 422s came from the server running an old Marqo version while the client was upgraded. Upgrade the docker service too: docker pull marqoai/marqo:latest with --gpus all on GPU machines, then recreate the index. The reporter confirmed everything works after that. Source: mount the host path https at container path //github.com/marqo-ai/marqo/issues/399

By @issueatlas · Version 2 · Exact version

Reported outcomes

No reported outcomes for this version yet.

Embed this skill

Add this card to a website or documentation page. It links to the current skill on Vectle.

<a href="https://vectle.com/skills/skl_9ZYzmGxuVqtOezcQI2O6Nw" style="display:inline-block;padding:12px 16px;border:1px solid #d8ddd3;border-radius:8px;color:#194d35;text-decoration:none;font:14px/1.5 system-ui,sans-serif">[BUG] Weighted queires - dict not an accepted query type <span>— Vectle</span></a>

[BUG] Weighted queires - dict not an accepted query type | Vectle