Closed kevindckr closed 9 months ago
Hi!
Thanks for all the info. I've never tested on windows only osx and linux based systems (which is noted in the installation docs somewhere but it's def not front and center enough). So I guess thanks for being a beta tester!
My first guess is that the error is occurring when spock tries to get the git info of the directory you are working out of to append to the serialized configuration file. It uses a subprocess to call out to git see here: https://github.com/fidelity/spock/blob/1ee250301e9ce6638fb71cec31747b3fb35abb23/spock/utils.py#L602
So it looks like something is going wonky with exiting/killing the subprocess cleanly (as indicated by the __del__
traceback)
Short term band-aid - you can set the flag within the save call to turn off writing the extra_info to the configuration file (https://fidelity.github.io/spock/reference/builder#save). e.g.
SpockBuilder(SpockClass).save(extra_info=False).generate()
This is just extra info that isn't critical to serialization of the actual spock config so everything should still work 100% normally.
I'll try and see if I can figure out what the problem is with window not existing the subprocess correctly.
Nick
I have started a simple tutorial for my use case and exploring what spock offers.
The corresponding configuration file I have create is the following
When ran with the command
python <...>\config_path.py --config paths.json
I receive the following exception:Though this does result in, from what I can tell, a correctly saved
.toml
file. It contains a header with various info about the machine, python, and git state, the[ConfigPath]
parameters themselves, and a footer with the various python libraries in my environment.This issue does not happen when not calling
.save
, I load the configuration file into a namespace and print it. This is all under Windows 10 system. Usingspock-config
3.0.2.