Shriram Holla
05/30/2022, 2:38 PMflow.run() , it works just fine. However, I’m running a local backend server and when I try to register the task using flow.register() , I get this error:
File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py", line 476, in save
    f(self, obj) # Call unbound method with explicit self
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py", line 736, in save_tuple
    save(element)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py", line 476, in save
    f(self, obj) # Call unbound method with explicit self
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py", line 821, in save_dict
    self._batch_setitems(obj.items())
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py", line 847, in _batch_setitems
    save(v)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py", line 476, in save
    f(self, obj) # Call unbound method with explicit self
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py", line 821, in save_dict
    self._batch_setitems(obj.items())
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py", line 847, in _batch_setitems
    save(v)
  File "/Library/Frameworks/Python.framework/Versions/3.6/lib/python3.6/pickle.py", line 496, in save
    rv = reduce(self.proto)
  File "/Users/shriramholla/.pyenvs/python3.6/lib/python3.6/site-packages/absl/flags/_flagvalues.py", line 677, in __getstate__
    raise TypeError("can't pickle FlagValues")
TypeError: can't pickle FlagValues
Note: Nothing is being passed into or being returned by any taskAnna Geller
Shriram Holla
05/30/2022, 2:47 PMflow.registerAnna Geller
Shriram Holla
05/30/2022, 3:35 PMAnna Geller
Kevin Kho
@task(checkpoint=False)
def mytask():
    return FlagValuesShriram Holla
05/30/2022, 4:23 PMKevin Kho
Shriram Holla
05/30/2022, 4:31 PMShriram Holla
05/30/2022, 4:37 PMAnna Geller
prefect register --project xyz -p yourflow.pyShriram Holla
05/30/2022, 4:39 PMShriram Holla
05/30/2022, 4:42 PMbazel run <register_flow_script>
without specifying a python fileAnna Geller