Closed jgoizueta closed 5 years ago
Note that this happens only in production, in staging we don't have the client
field in the response
On closer inspection, the method from pyrestcli seems OK since it restricts properties copied to those in self.fields
and the problem lies in the method overriden in carto-python:
https://github.com/CartoDB/carto-python/blob/bcbc66d00feced6e7c9dc713dce7ebfc8d8998d9/carto/maps.py#L165-L166
When a named map is read (
named_map_manager.get(named_map_id)
) the API response includes aclient
field ("client":"cps-1.4.0"
) and pyrestcli uses it to overwrite the client (e.g.APIKeyAuthClient
) of the named map resource.As a result, any call on the named map object using the client (e.g. an instantiation) will fail (the client is a string!)