# An internal error occurred processing your request - Reason: must be str, not int

**URL:** <https://forum.ecmwf.int/t/an-internal-error-occurred-processing-your-request-reason-must-be-str-not-int/1359>\
**Category:** CAMS - Access and Login\
**Tags:** cams, ads\
**Created:** [13 July 2022 13:42 UTC](https://forum.ecmwf.int/t/an-internal-error-occurred-processing-your-request-reason-must-be-str-not-int/1359 "2022-07-13T13:42:05Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Aidan\_Breen](https://forum.ecmwf.int/letter_avatar_proxy/v4/letter/a/f0a364/32.png) [@Aidan\_Breen](https://forum.ecmwf.int/u/Aidan_Breen)\
**Post date:** [13 July 2022 13:42 UTC](https://forum.ecmwf.int/t/an-internal-error-occurred-processing-your-request-reason-must-be-str-not-int/1359/1 "2022-07-13T13:42:05Z")

</div>

**Update: The issue seems to be resolved.**

Hi, I have just encountered an issue making requests to the CDS API for the CAMS solar radiation time-series product.&nbsp;

The issue occurs both from my code (using python cdsapi package) and from the web page ([https://ads.atmosphere.copernicus.eu/cdsapp#!/dataset/cams-solar-radiation-timeseries](https://ads.atmosphere.copernicus.eu/cdsapp#!/dataset/cams-solar-radiation-timeseries))

I thought at first I was being rate-limited but it is also happening from a different user account.&nbsp;

The full traceback I receive from the API request:

```
ERROR:cdsapi: Traceback (most recent call last):
ERROR:cdsapi: File "/opt/cdstoolbox/cdscompute/cdscompute/cdshandlers/services/handler.py", line 59, in handle_request
ERROR:cdsapi: result = cached(context.method, proc, context, context.args, context.kwargs)
ERROR:cdsapi: File "/opt/cdstoolbox/cdscompute/cdscompute/caching.py", line 108, in cached
ERROR:cdsapi: result = proc(context, *context.args, **context.kwargs)
ERROR:cdsapi: File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 124, in __call__
ERROR:cdsapi: return p(*args, **kwargs)
ERROR:cdsapi: File "/opt/cdstoolbox/cdscompute/cdscompute/services.py", line 60, in __call__
ERROR:cdsapi: return self.proc(context, *args, **kwargs)
ERROR:cdsapi: File "/home/cds/cdsservices/services/cams_solar_rad.py", line 37, in execute
ERROR:cdsapi: File "/opt/cdstoolbox/cds-common/cds_common/cams/solar_radiation/solar_rad_retrieve.py", line 26, in solar_rad_retrieve
ERROR:cdsapi: user_id = anonymised_user_id(user_id)
ERROR:cdsapi: File "/opt/cdstoolbox/cds-common/cds_common/cams/solar_radiation/solar_rad_retrieve.py", line 56, in anonymised_user_id
ERROR:cdsapi: (' __%SecretFromDataProvider%__' + ads_user_id).encode()).hexdigest()
ERROR:cdsapi: TypeError: must be str, not int
```

This suggests that my user id (a four digit number) is being parsed as an int at some point.&nbsp;

If the solar\_rad\_retrieve.py is being executed with python \>3.8, line 56 could be modified to use f-strings and hopefully remedy the issue:

```
(f' __%SecretFromDataProvider%__ {ads_user_id}').encode()).hexdigest()
```
