Skip to content

Fix ValueError from getnc() returning 3 values but call sites unpacking 2#41

Merged
SBFRF merged 3 commits into
refactor/use-config-constantsfrom
copilot/sub-pr-36
Feb 2, 2026
Merged

Fix ValueError from getnc() returning 3 values but call sites unpacking 2#41
SBFRF merged 3 commits into
refactor/use-config-constantsfrom
copilot/sub-pr-36

Conversation

Copilot AI commented Feb 2, 2026

Copy link
Copy Markdown
Contributor

After commit bbedac5 changed getnc() to return 3 values (ncFile, allEpoch, indexRef) instead of 2, multiple call sites still unpacked only 2 values, causing runtime ValueError.

Changes

  • Updated 12 call sites to unpack 3 values, using _ for unused indexRef:

    • getWind(), getWaterLevel(), getCurrent(), getLidarData(), getCTD(), getCTDtransect(), getCTDquikcat(), getAltimeter(), get1mPhotoData(), getCMSrunTimeseriesatPoint(), getCSHORERuns()
  • Simplified getBathyTransectFromNC():

    • Removed conditional len(dataReturns) logic (no longer needed since getnc() always returns 3 values)
    • Handle indexRef=None case: indexRef[0] if indexRef is not None else 0

Example

# Before (ValueError - too many values to unpack)
self.ncfile, self.allEpoch = getnc(dataLoc=self.dataloc, ...)

# After
self.ncfile, self.allEpoch, _ = getnc(dataLoc=self.dataloc, ...)

💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

@SBFRF
SBFRF marked this pull request as ready for review February 2, 2026 02:33
Copilot AI review requested due to automatic review settings February 2, 2026 02:33

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

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

Copilot wasn't able to review any files in this pull request.


💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Copilot AI and others added 2 commits February 2, 2026 02:38
Co-authored-by: SBFRF <8375832+SBFRF@users.noreply.github.com>
Co-authored-by: SBFRF <8375832+SBFRF@users.noreply.github.com>

Copilot AI commented Feb 2, 2026

Copy link
Copy Markdown
Contributor Author

Just as a heads up, I was blocked by some firewall rules while working on your feedback. Expand below for details.

Warning

Firewall rules blocked me from connecting to one or more addresses (expand for details)

I tried to connect to the following addresses, but was blocked by firewall rules:

  • chldata.erdc.dren.mil
    • Triggering command: /usr/bin/python python -m pytest tests/test_ncml_indexing_regression.py -v (dns block)

If you need me to access, download, or install something from one of these locations, you can either:

Copilot AI changed the title [WIP] Update config constants for retry attempts and time rounding Fix ValueError from getnc() returning 3 values but call sites unpacking 2 Feb 2, 2026
Copilot AI requested a review from SBFRF February 2, 2026 02:42

@SBFRF SBFRF left a comment

Copy link
Copy Markdown
Owner

Choose a reason for hiding this comment

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

lgtm

@SBFRF
SBFRF merged commit 4f6fcf4 into refactor/use-config-constants Feb 2, 2026
@SBFRF
SBFRF deleted the copilot/sub-pr-36 branch February 2, 2026 02:43
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

Successfully merging this pull request may close these issues.

3 participants