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

Error when parameter in external file is class defined in __main__ #323

Open
sternj opened this issue Jan 10, 2024 · 1 comment
Open

Error when parameter in external file is class defined in __main__ #323

sternj opened this issue Jan 10, 2024 · 1 comment

Comments

@sternj
Copy link

sternj commented Jan 10, 2024

Running monkeytype run lanaro_particle.py and then monkeytype apply extracted_evolve_python (also happens with stub) on this gist, I get a silent failure, which warns WARNING: Failed decoding trace: Module '__main__' has no attribute 'ParticleSimulator' in verbose mode. Looking at the trace itself, I'm seeing

2024-01-10 16:04:30.364209|extracted_evolve_python|extracted_evolve_python|{"nsteps": {"module": "builtins", "qualname": "int"}, "self": {"module": "__main__", "qualname": "ParticleSimulator"}, "timestep": {"module": "builtins", "qualname": "float"}}|{"module": "builtins", "qualname": "NoneType"}|
@sternj
Copy link
Author

sternj commented Jan 10, 2024

Actual nature of the error aside, I think there's a case to be made for trace-decoding-failed being fail-stop (or at least optionally so), but it seems like this is very deliberate behavior

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

1 participant