Raise JSONDecodeError("Expecting value", s, err.value) from None Obj, end = self.raw_decode(s, idx=_w(s, 0).end())įile "C:\Users\home\AppData\Local\Programs\Python\Python37-32\lib\json\decoder.py", line 355, in raw_decode Return complexjson.loads(self.text, **kwargs)įile "C:\Users\home\AppData\Local\Programs\Python\Python37-32\lib\json\_init_.py", line 348, in loadsįile "C:\Users\home\AppData\Local\Programs\Python\Python37-32\lib\json\decoder.py", line 337, in decode Pydev_imports.execfile(file, globals, locals) # execute the scriptįile "c:\Users\home\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\_pydev_imps\_pydev_execfile.py", line 25, in execfileĮxec(compile(contents+"\n", file, 'exec'), glob, loc)įile "e:\Dropbox2\Dropbox\Ubot\Ubot\Python\Taboola-API-playground.py", line 34, in įile "C:\Users\home\AppData\Local\Programs\Python\Python37-32\lib\site-packages\requests\models.py", line 897, in json Return self._exec(is_module, entry_point_fn, module_name, file, globals, locals)įile "c:\Users\home\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1114, in _exec bug(filename, port_num, '', '', run_as)įile "c:\Users\home\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\experimental\ptvsd\ptvsd\debugger.py", line 37, in debugįile "c:\Users\home\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\experimental\ptvsd\ptvsd\_local.py", line 79, in run_fileįile "c:\Users\home\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\experimental\ptvsd\ptvsd\_local.py", line 140, in _runįile "c:\Users\home\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1751, in mainįile "c:\Users\home\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\experimental\ptvsd\ptvsd\_vendored\pydevd\pydevd.py", line 1107, in run Traceback C:\Users\home\VisualCodeProjects>^Zcd c:\Users\home\VisualCodeProjects & cmd /C "set "PYTHONIOENCODING=UTF-8" & set "PYTHONUNBUFFERED=1" & python c:\Users\home\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\experimental\ptvsd_launcher.py 57290 e:\Dropbox2\Dropbox\Ubot\Ubot\Python\Taboola-API-playground.py "Ĭ:\Users\home\VisualCodeProjects>cd c:\Users\home\VisualCodeProjects & cmd /C "set "PYTHONIOENCODING=UTF-8" & set "PYTHONUNBUFFERED=1" & python c:\Users\home\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\experimental\ptvsd_launcher.py 57426 e:\Dropbox2\Dropbox\Ubot\Ubot\Python\Taboola-API-playground.py "īearer CXwJAAAAAAAAEVDsAhZjgzY2IyZjU0YzM0Zjk1MmYyNDRiZmU0Njg4OTAyZEAC::xxxxx::yyyyyyįile "c:\Users\home\.vscode\extensions\ms-python.python-2018.9.2\pythonFiles\experimental\ptvsd_launcher.py", line 118, in Resp = requests.post(url=url, data=json.dumps(data), headers=) This is the first time I'm dealing with an API import requestsĪuthRequest = requests.post(""+ client_key +"&client_secret="+ client_secret)
I'm a beginner, so your criticism about my code would be welcome too. I'm authenticating using a site API and then trying to post a JSON object to create a campaign, but I can't figure out what I'm doing wrong.
I'm getting the error in the title (see full traceback below) with this code.