The SMILES string you are using contains forward slash (/), and it seems that the error message is complaining about the forward slash. So, instead of using the SMILES string in the URL, use it as an argument in the requests.get() function.
Here is the example code to fix the error:
>>> import requests
>>> import json
>>> smi = "CC(C)NC(=O)C=1C=C(C=CC1/N=C/2\CN(CCN2C)C)[N+](=O)[O-]"
>>> pubchem_url = "https ://pubchem.ncbi.nlm.nih.gov/rest/pug/compound/smiles/synonyms/JSON"
>>> f = requests.get(pubchem_url, params={'smiles': smi})
>>> chem_df = json.loads(f.text)
>>> chem_name = chem_df['InformationList']['Information'][0]['Synonym'][0]
>>> chem_name
'CHEMBL3342035'
>>>
I have put a space between "https" and ":" in the variable "pubchem_url". Delete the space to run it.