HydrologicEngineeringCenter / HydrologicEngineeringCenter/cwms-python

cwms/projects/projects.py::get_project uses the wrong API version for retrieval

Open
#289 0 comments 0 reactions 0 assignees View on GitHub

@krowvin is already working on this.

Since Sep 11, 2026.

  • #319 by @krowvin — open
Dominant language
Python
Stars
16
Forks
11
Avg merge
4d 6h
Merged PRs (30d)
8

Description

projects.py uses the default API version for retrieval, and causes the following error:
{"message":"Formatting error:No Format for this content-type and data-type : (application/json;version=2, cwms.cda.data.dto.project.Project)", "incidentIdentifier":"bf796eca-d668-4e14-923c-db78845580c0", "source":"Parser","details":{}}

After looking at CDA, it's expecting API version 1
https://github.com/USACE/cwms-data-api/blob/develop/cwms-data-api/src/main/java/cwms/cda/api/ProjectController.java#L159
https://github.com/USACE/cwms-data-api/blob/develop/cwms-data-api/src/main/java/cwms/cda/api/ProjectController.java#L183-L187

We can either update CDA to support a new version, or update projects.py to use the correct version.

Contributor guide

Open the contributing guide

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

Research direction

Start in cwms/projects/projects.py and inspect the project retrieval path, then compare its API version with the ProjectController references in the linked cwms-data-api code. Review pull request #319 before changing anything; done means project retrieval no longer requests the unsupported version and the reported formatting error is resolved.

Written by the indexing model from the issue text.

Assessment

Tech stack
python
Domain
api
Issue type
Bug
Difficulty
2/5
Estimated time
1-3 hours
Activity status
Stale
Clarity
Mostly clear
Newbie friendliness
25/100

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.