Skip to content

A problem #152

@zhangyuyayaya

Description

@zhangyuyayaya

When running GRACE-Harmonic-Plots.ipynb, the following error occurs. What should I do to solve it?
Problems with running this section.
QQ20241127-215506

Traceback (most recent call last):
File "E:\Ph.D\Code\GRACE\gravity-toolkit-1.2.1\gravity-toolkit-1.2.1\1125test.py", line 83, in
Ylms = gravtk.grace_input_months(widgets.base_directory, PROC, DREL, DSET,
File "E:\Ph.D\Code\GRACE\gravity-toolkit-1.2.1\gravity-toolkit-1.2.1\gravity_toolkit\grace_input_months.py", line 421, in grace_input_months
Ylms = read_GRACE_harmonics(infile, LMAX, MMAX=MMAX,
File "E:\Ph.D\Code\GRACE\gravity-toolkit-1.2.1\gravity-toolkit-1.2.1\gravity_toolkit\read_GRACE_harmonics.py", line 213, in read_GRACE_harmonics
grace_L2_input.update(yaml.load('\n'.join(head),Loader=yaml.BaseLoader))
File "D:\Professional\Anaconda3\envs\gravity_toolkit\lib\site-packages\pyyaml-6.0.2-py3.10-win-amd64.egg\yaml_init_.py", line 81, in load
return loader.get_single_data()
File "D:\Professional\Anaconda3\envs\gravity_toolkit\lib\site-packages\pyyaml-6.0.2-py3.10-win-amd64.egg\yaml\constructor.py", line 49, in get_single_data
node = self.get_single_node()
File "D:\Professional\Anaconda3\envs\gravity_toolkit\lib\site-packages\pyyaml-6.0.2-py3.10-win-amd64.egg\yaml\composer.py", line 35, in get_single_node
if not self.check_event(StreamEndEvent):
File "D:\Professional\Anaconda3\envs\gravity_toolkit\lib\site-packages\pyyaml-6.0.2-py3.10-win-amd64.egg\yaml\parser.py", line 98, in check_event
self.current_event = self.state()
File "D:\Professional\Anaconda3\envs\gravity_toolkit\lib\site-packages\pyyaml-6.0.2-py3.10-win-amd64.egg\yaml\parser.py", line 142, in parse_implicit_document_start
if not self.check_token(DirectiveToken, DocumentStartToken,
File "D:\Professional\Anaconda3\envs\gravity_toolkit\lib\site-packages\pyyaml-6.0.2-py3.10-win-amd64.egg\yaml\scanner.py", line 116, in check_token
self.fetch_more_tokens()
File "D:\Professional\Anaconda3\envs\gravity_toolkit\lib\site-packages\pyyaml-6.0.2-py3.10-win-amd64.egg\yaml\scanner.py", line 227, in fetch_more_tokens
return self.fetch_alias()
File "D:\Professional\Anaconda3\envs\gravity_toolkit\lib\site-packages\pyyaml-6.0.2-py3.10-win-amd64.egg\yaml\scanner.py", line 610, in fetch_alias
self.tokens.append(self.scan_anchor(AliasToken))
File "D:\Professional\Anaconda3\envs\gravity_toolkit\lib\site-packages\pyyaml-6.0.2-py3.10-win-amd64.egg\yaml\scanner.py", line 922, in scan_anchor
raise ScannerError("while scanning an %s" % name, start_mark,
yaml.scanner.ScannerError: while scanning an alias
in "", line 1, column 1:
******************************** ...
^
expected alphabetic or numeric character, but found '*'
in "", line 1, column 2:
********************************* ...
^

I believe this would be a problem with the header file of the data file.
But when I remove the GSM-2_2002095-2002120_GRAC_UTCSR_BA01_0600.gfc header file into keep the following.
QQ20241127-220220
Then the following error occurs.
Traceback (most recent call last):
File "E:\Ph.D\Code\GRACE\gravity-toolkit-1.2.1\gravity-toolkit-1.2.1\1125test.py", line 83, in
Ylms = gravtk.grace_input_months(widgets.base_directory, PROC, DREL, DSET,
File "E:\Ph.D\Code\GRACE\gravity-toolkit-1.2.1\gravity-toolkit-1.2.1\gravity_toolkit\grace_input_months.py", line 421, in grace_input_months
Ylms = read_GRACE_harmonics(infile, LMAX, MMAX=MMAX,
File "E:\Ph.D\Code\GRACE\gravity-toolkit-1.2.1\gravity-toolkit-1.2.1\gravity_toolkit\read_GRACE_harmonics.py", line 213, in read_GRACE_harmonics
grace_L2_input.update(yaml.load('\n'.join(head),Loader=yaml.BaseLoader))
ValueError: dictionary update sequence element #0 has length 1; 2 is required

I don't know what it is and how I should go about fixing it. Or what should be the correct data file format?

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions