Skip to content

Conversation

@qwyt
Copy link
Contributor

@qwyt qwyt commented Feb 8, 2022

json2ts started failing on my machine due to some hard to reproduce issue related running x86 binaries on an m1 mac. However since the output file was still there (it previously worked fine) pydantic-to-typescript still attempted to call 'remove_master_model_from_output' on it and failed with this message as a result:

line 111, in remove_master_model_from_output
new_lines = lines[:start] + lines[(end + 1) :]
TypeError: unsupported operand type(s) for +: ‘NoneType’ and ‘int’

(the error is the same as in #5, not sure if it's caused by the same issue)

because obviously the master model was already stripped. This was confusing and it took me some time to figure out that json2ts was failling.

qwyt and others added 3 commits February 8, 2022 18:35
…new file due to whatever reason 'remove_master_model_from_output' is still called, this results in a confusing error message. Instead check exit code of json2ts and output it to log.
@phillipdupuis phillipdupuis merged commit c2b7473 into phillipdupuis:master Aug 29, 2022
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

Successfully merging this pull request may close these issues.

2 participants