I am hitting an issue when trying to unpickle and ...
# ask-community
n
I am hitting an issue when trying to unpickle and internal class object inside of a deployed prefect flow. It is raising the following error:
Can't get attribute 'Document' on <module 'prefect.engine' from '/app/.venv/lib/python3.11/site-packages/prefect/engine.py'>
This runs fine in prefect locally but not once deployed with a docker image. I am importing the
Document
class at the top of my file containing the flow. Any ideas why this might be happening?
n
hi @Nelson Griffiths - this is odd. it looks like its thinking your document class is in
prefect.engine
? can you show your import? im wondering if there is some namespace conflict
n
Basically this:
from my_private_library.tools.namespace import Document
n
hmm im not sure
do you have the whole stack trace?
n
Let me see if I can get that real quick
Sorry for the late reply. Pickle was a poor choice of tool for this. We just moved to json instead and it works. Not sure what the error is but everything is working without pickle now.
👍 1