You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Getting the following error for get_all_data_for_profile()
raise InvalidURL(f"URL can't contain control characters. {url!r} "
InvalidURL: URL can't contain control characters. '/api/all_data/csv/by_profile_id?child_area_type_id=502 &parent_area_type_id=15&profile_id=19' (found at least ' ')
17 frames /usr/lib/python3.10/http/client.py in _validate_path(self, url)
1226 match = _contains_disallowed_url_pchar_re.search(url)
1227 if match:
-> 1228 raise InvalidURL(f"URL can't contain control characters. {url!r} "
1229 f"(found at least {match.group()!r})")
1230
InvalidURL: URL can't contain control characters. '/api/all_data/csv/by_profile_id?child_area_type_id=3 &parent_area_type_id=401&profile_id=32' (found at least ' ')
Looks like the request is including spaces where the second line of the fstrings formatted populated_url is indented. Changing it to the following will fix it: populated_url = f'all_data/csv/by_profile_id?child_area_type_id={area}' \ f'&parent_area_type_id={parent_area_type_id}&profile_id={profile_id}'
Getting the following error for get_all_data_for_profile()
raise InvalidURL(f"URL can't contain control characters. {url!r} "
InvalidURL: URL can't contain control characters. '/api/all_data/csv/by_profile_id?child_area_type_id=502 &parent_area_type_id=15&profile_id=19' (found at least ' ')
Tried:
profile_id=19
phof = ftp.get_all_data_for_profile(profile_id,
area_type_id=502)
and
phof = ftp.get_all_data_for_profile(profile_id=19,
area_type_id=502)
The text was updated successfully, but these errors were encountered: