question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

`is_serializable` returns False for "hello world" flow

See original GitHub issue

Hi guys,

I have an issue on my flow that seems like it may be related to serialization.

So I’ve tried using the is_serializable function, which returned False for my flow. I have made my flow simpler to test it and kept getting False, until I tried the simple “Hello World” example from the homepage, and was surprised to see that that one too returns False for the flow:

from prefect import task, Flow
from prefect.utilities.debug import is_serializable

@task
def say_hello():
    print("Hello, world!")

with Flow("My First Flow") as flow:
    say_hello()

if is_serializable(flow) is False:
    raise ValueError('flow is not serializable at checkpoint 1')
    
flow.run() # "Hello, world!"

The output of the above is:

Traceback (most recent call last):
  File "hello.py", line 12, in <module>
    raise ValueError('flow is not serializable at checkpoint 1')
ValueError: flow is not serializable at checkpoint 1

Is this expected?

Thanks

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:9 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
orcamancommented, Jul 25, 2019

Thanks. I’m on MacOS Mojave 10.14.5 (18F132) with prefect-0.6.0 and Python 3.7.3

0reactions
jcristcommented, Jul 8, 2020

Fixed by #2931. Closing.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Defining flows - ZIO
The simplest way to interact with the outside world from a ZIO Flow program is to log a message: val flow7 = ZFlow.log("Hello...
Read more >
Results - Prefect 2 - Coordinating the world's dataflows
Prefect results capture the data returned from your flows and tasks. ... task uses caching so its result will be persisted by default...
Read more >
Object serialization - R3 Documentation
The syntax to declare a serializable Lambda expression that will work with Corda is Runnable r = (Runnable & Serializable) () -> System.out.println("Hello...
Read more >
java - Why does this code return false instead of true? - Stack Overflow
You don't initialize the char array with the input String. Change public boolean searchWord(String word) { char[] wordChar; wordChar = new ...
Read more >
Bug descriptions — spotbugs 4.7.3 documentation
It should simply return false if o is not the same type as this . J2EE: Store of non serializable object into HttpSession...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found