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

False is not of type string #10

Open
crargr opened this issue Feb 10, 2023 · 6 comments
Open

False is not of type string #10

crargr opened this issue Feb 10, 2023 · 6 comments

Comments

@crargr
Copy link

crargr commented Feb 10, 2023

Hello @trondkr sorry for the bother.

I don't understand what is happening, I am setting

        self.start_year = 2017
        self.end_year = 2020
        self.project = "IEA"

with

        return {'IEA': '80/-40/45/15',
                'A20': '90/-180/40/180'}[project]

and I am getting the following:

2023-02-10 12:52:12,079 INFO Request is failed
2023-02-10 12:52:12,079 ERROR Message: the request you have submitted is not valid
2023-02-10 12:52:12,080 ERROR Reason:
request['verbose'][0]: False is not of type 'string'
2023-02-10 12:52:12,080 ERROR Traceback (most recent call last):
2023-02-10 12:52:12,080 ERROR File "/opt/cdstoolbox/cdscompute/cdscompute/cdshandlers/services/handler.py", line 59, in handle_request
2023-02-10 12:52:12,080 ERROR result = cached(context.method, proc, context, context.args, context.kwargs)
2023-02-10 12:52:12,080 ERROR File "/opt/cdstoolbox/cdscompute/cdscompute/caching.py", line 108, in cached
2023-02-10 12:52:12,080 ERROR result = proc(context, *context.args, **context.kwargs)
2023-02-10 12:52:12,080 ERROR File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 124, in call
2023-02-10 12:52:12,080 ERROR return p(*args, **kwargs)
2023-02-10 12:52:12,080 ERROR File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 60, in call
2023-02-10 12:52:12,080 ERROR return self.proc(context, *args, **kwargs)
2023-02-10 12:52:12,080 ERROR File "/home/cds/cdsservices/services/mars/mars.py", line 48, in internal
2023-02-10 12:52:12,080 ERROR return mars(context, request, **kwargs)
2023-02-10 12:52:12,080 ERROR File "/home/cds/cdsservices/services/mars/mars.py", line 18, in mars
2023-02-10 12:52:12,080 ERROR **kwargs)
2023-02-10 12:52:12,080 ERROR File "/home/cds/cdsservices/services/mars/preprocess_request.py", line 24, in preprocess_request
2023-02-10 12:52:12,080 ERROR requests = enforce_minimal_schema(requests, context)
2023-02-10 12:52:12,080 ERROR File "/home/cds/cdsservices/services/mars/request_checking.py", line 54, in enforce_minimal_schema
2023-02-10 12:52:12,080 ERROR return enforce_schema(requests, schema, context)
2023-02-10 12:52:12,080 ERROR File "/opt/cdstoolbox/cds-common/cds_common/request_schemas/enforce_schema.py", line 29, in enforce_schema
2023-02-10 12:52:12,080 ERROR from None
2023-02-10 12:52:12,080 ERROR cdsinf.exceptions.BadRequestException:
2023-02-10 12:52:12,080 ERROR request['verbose'][0]: False is not of type 'string'

The funny thing is that this very same code was working very well last December.
Any help and suggestion you could provide?

Thank you very much in advance.

@trondkr
Copy link
Owner

trondkr commented Feb 10, 2023 via email

@crargr
Copy link
Author

crargr commented Feb 10, 2023

@trondkr thank you for your message. I will do as you say. Just to confirm, it still works for you, yes?
All best,
crargr

@trondkr
Copy link
Owner

trondkr commented Feb 10, 2023 via email

@crargr
Copy link
Author

crargr commented Feb 10, 2023

Dear @trondkr after messing a lot with the code, I found that commenting out

"verbose": self.config_ecmwf.debug
from ECMWF_tools.py makes all work back to normal.
Should I open a pull request?
All best,
crargr

@trondkr
Copy link
Owner

trondkr commented Feb 10, 2023 via email

@crargr
Copy link
Author

crargr commented Feb 11, 2023

Hi @trondkr , I couldn't manage to do it.
I attached here the file I changed. It was only a line but it might be caused by what you pointed out in your messages about the python versions.
All best,
crargr
ECMWF_tools.zip

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