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

fCNV JSONDecoder error #72

Open
fpahernandez opened this issue Jun 19, 2023 · 2 comments
Open

fCNV JSONDecoder error #72

fpahernandez opened this issue Jun 19, 2023 · 2 comments

Comments

@fpahernandez
Copy link

Using fCNV to read a .cnv profile:

import sys
import numpy as np
import seabird
from seabird.cnv import fCNV
Fic = DirHydro + DirABR + "Est11__SouthBahia.cnv"
profile = fCNV(Fic)

Error description:

Traceback (most recent call last):

File "/var/folders/s5/l4k15wz11tj840w0qyj2ksph0000gn/T/ipykernel_9928/2120108936.py", line 1, in
profile = fCNV(Fic)

File "/Users/fhernandez/opt/anaconda3/envs/dev39/lib/python3.10/site-packages/seabird/cnv.py", line 574, in init
super(fCNV, self).init(text, defaults)

File "/Users/fhernandez/opt/anaconda3/envs/dev39/lib/python3.10/site-packages/seabird/cnv.py", line 58, in init
self.rule, self.parsed = load_rule(self.raw_text)

File "/Users/fhernandez/opt/anaconda3/envs/dev39/lib/python3.10/site-packages/seabird/utils.py", line 77, in load_rule
rule = json.loads(text.decode('utf-8'), encoding="utf-8")

File "/Users/fhernandez/opt/anaconda3/envs/dev39/lib/python3.10/json/init.py", line 359, in loads
return cls(**kw).decode(s)

TypeError: JSONDecoder.init() got an unexpected keyword argument 'encoding'

USING:
MAcOS 12.6.1
Anaconda Navigator 2.3.2
cotede 0.23.7
seabird 0.11.5
python 3.10.6

@castelao
Copy link
Owner

castelao commented Jun 19, 2023 via email

@fpahernandez
Copy link
Author

Thanks a lot. I updated usind "conda update seabird" on my environnement. It works. By the way, my .cnv files do not contain lon/lat (they are recorded only onto the log doc from the sea campaign). Is there a way to update the cnv file with lon/lat data? Thanks again for your effort for the community.

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

No branches or pull requests

2 participants