<#20024 Type error on FileContent results in infin...
# github-notifications
c
#20024 Type error on FileContent results in infinite loop Issue created by hopper-signifyd Describe the bug I'm working on a custom plugin and I did this:
Copy code
content = FileContent(path=versions_file_path, content="some string")
digest = await Get(Digest, CreateDigest([content]))
That resulted in the infamous
Filesystem changed during run: retrying 'MyGoal'
infinite loop. I was really confused. Upon further inspection of the run logs, I found this:
Copy code
09:14:56.95 [31m[ERROR][0m panic at 'called `Result::unwrap()` on an `Err` value: "Field `content` was not convertible to type alloc::vec::Vec<u8>: PyErr { type: <class 'TypeError'>, value: TypeError(\"'str' object cannot be interpreted as an integer\"), traceback: None }"', src/intrinsics.rs:422
So I updated the code above to call
.encode()
on the string before passing it as content and things started working. However, I feel like my mistake should have resulted in an error / failure instead of the infinite
Filesystem changed
loop as this just made things harder to debug. Pants version 2.16.0 OS MacOS Additional info I like pants pantsbuild/pants