tap-github
tap-github copied to clipboard
json.decoder.JSONDecodeError when running tap-github
I am getting an error json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
when I run tap-github\
Steps to reproduce:
- Create virtual environment
virtualenv -p python3 venv
-
.\Scripts\activate
to activate virtual env -
pip install tap-github
- edited
config.json
to add github access token - edited properties.json to add
"selected": true,
for required streams - ran
tap-github --config config.json --properties properties.json
Errors:
CRITICAL Expecting value: line 1 column 1 (char 0)
Traceback (most recent call last):
File "C:\Users\dgoswami\AppData\Local\Programs\Python\Python39\Lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\dgoswami\AppData\Local\Programs\Python\Python39\Lib\runpy.py", line 87, in _run_code
exec(code, run_globals)
File "X:\CODE\tap\venv\Scripts\tap-github.exe\__main__.py", line 7, in <module>
File "x:\code\tap\venv\lib\site-packages\singer\utils.py", line 225, in wrapped
return fnc(*args, **kwargs)
File "x:\code\tap\venv\lib\site-packages\tap_github\__init__.py", line 977, in main
args = singer.utils.parse_args(REQUIRED_CONFIG_KEYS)
File "x:\code\tap\venv\lib\site-packages\singer\utils.py", line 174, in parse_args
args.properties = load_json(args.properties)
File "x:\code\tap\venv\lib\site-packages\singer\utils.py", line 109, in load_json
return json.load(fil)
File "C:\Users\dgoswami\AppData\Local\Programs\Python\Python39\Lib\json\__init__.py", line 293, in load
return loads(fp.read(),
File "C:\Users\dgoswami\AppData\Local\Programs\Python\Python39\Lib\json\__init__.py", line 346, in loads
return _default_decoder.decode(s)
File "C:\Users\dgoswami\AppData\Local\Programs\Python\Python39\Lib\json\decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "C:\Users\dgoswami\AppData\Local\Programs\Python\Python39\Lib\json\decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
args.properties = load_json(args.properties)
seems like your properties.json
is invalid
I get the same error. Note that the properties file is newly created with the --discover
command. Running it without changing the properties.json
file at all, still fails.
This is an encoding problem. Saving the file as UTF-8
solves the problem.