joshpxyne / gpt-migrate

Easily migrate your codebase from one framework or language to another.
https://gpt-migrate.com
MIT License
6.87k stars 485 forks source link

`json.decoder.JSONDecodeError` #52

Open hognevevle opened 8 months ago

hognevevle commented 8 months ago
✅  Parsing function signatures for <file>...
Traceback (most recent call last):

  File "<string>", line 1, in <module>

  File ".../src/gpt_migrate/main.py", line 195, in main
    migrate(sourceentry, globals)

  File ".../src/gpt_migrate/main.py", line 186, in migrate
    migrate(dependency, globals, parent_file=sourcefile)

  File ".../src/gpt_migrate/main.py", line 187, in migrate
    file_name = write_migration(
                ^^^^^^^^^^^^^^^^

  File ".../src/gpt_migrate/steps/migrate.py", line 161, in write_migration
    sigs = get_function_signatures(deps_per_file, globals) if deps_per_file else []
           ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File ".../src/gpt_migrate/steps/migrate.py", line 62, in get_function_signatures
    sigs = json.loads(
           ^^^^^^^^^^^

  File "/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/__init__.py", line 346, in loads
    return _default_decoder.decode(s)
           ^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/json/decoder.py", line 337, in decode
    obj, end = self.raw_decode(s, idx=_w(s, 0).end())
               ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^

  File "/opt/homebrew/Cellar/python@3.11/3.11.3/Frameworks/Python.framework/Versions/3.11/lib/python3.11/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)
tomascharad commented 5 days ago

Same here