Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

json.decoder.JSONDecodeError when running tap-github #100

Open
devarshigoswami opened this issue Nov 16, 2020 · 3 comments
Open

json.decoder.JSONDecodeError when running tap-github #100

devarshigoswami opened this issue Nov 16, 2020 · 3 comments

Comments

@devarshigoswami
Copy link

devarshigoswami commented Nov 16, 2020

I am getting an error json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0) when I run tap-github\

Steps to reproduce:

  1. Create virtual environment virtualenv -p python3 venv
  2. .\Scripts\activate to activate virtual env
  3. pip install tap-github
  4. edited config.json to add github access token
  5. edited properties.json to add "selected": true, for required streams
  6. 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)

@luandy64
Copy link
Contributor

luandy64 commented Feb 4, 2021

args.properties = load_json(args.properties) seems like your properties.json is invalid

@martinnormark
Copy link

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.

@martinnormark
Copy link

This is an encoding problem. Saving the file as UTF-8 solves the problem.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants