Skip to content

Syntax Errors? #3218

Description

@rebeccaherman1

I have just updated my ESMValCore to the most recent version, and now when I try to import, I'm running into syntax errors.

I'm not sure what's going on; is it to do with my version of python (3.10.12)? Do I need to update to 3.12? (Is that possible on DKRZ? Updating seems to give me 3.10.14)

These imports:

from esmvalcore.config import CFG
from esmvalcore.dataset import Dataset
from esmvalcore.esgf import download, ESGFFile

all give me the error message:

  File ~/ESMValCore/esmvalcore/cmor/table.py:368
    f"Current configuration is:\n\n{
    ^
SyntaxError: unterminated string literal (detected at line 368)

referring to the following lines of code:

f"Current configuration is:\n\n{
yaml.safe_dump(
{'projects': {project: {'cmor_table': kwargs}}},
)
}\n"

And these imports:

import esmvalcore.preprocessor as pp
from esmvalcore.preprocessor.regrid_schemes import IrisESMFRegrid

are giving me the following error message:

File ~/ESMValCore/esmvalcore/preprocessor/__init__.py:803
    type PreprocessorItem = PreprocessorFile | Cube | DataElement
         ^
SyntaxError: invalid syntax

referring to the following line of code:

type PreprocessorItem = PreprocessorFile | Cube | DataElement

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions