a

    Adam Roderick

    2 years ago
    Hi, I'm running into an error with flow.deploy(), and trying to figure out how to troubleshoot. Any ideas? On one development machine, we get the expected result:
    \prefect\core\flow.py:1331: UserWarning: flow.deploy() will be deprecated in an upcoming release. Please use flow.register()
      UserWarning,
    [2020-03-23 22:36:15,573] INFO - prefect.Docker | Building the flow's Docker storage...
    On a second development machine, we get an error with not much context:
    /prefect/core/flow.py:1331: UserWarning: flow.deploy() will be deprecated in an upcoming release. Please use flow.register()
      UserWarning,
    Expecting value: line 1 column 1 (char 0)
    Chris White

    Chris White

    2 years ago
    šŸ§ is there really no more traceback on the second machine?
    (also FYI
    flow.deploy
    will be removed in the next release so you should replace it with
    flow.register
    ā€” same call signature just a different name)
    a

    Adam Roderick

    2 years ago
    yeah, no traceback
    Chris White

    Chris White

    2 years ago
    and the command returns after you see this printed? This will be a tough one to debug without being able to identify the line / command it originates from
    a

    Adam Roderick

    2 years ago
    Yes. Is there a flag or anything we can set to generate more verbose output?
    That line is returned instead of the expected
    INFO - prefect.Docker | Building the flow's Docker storage...
    2nd machine (the failing one) is a mac. 1st machine is windows
    Chris White

    Chris White

    2 years ago
    Because no error is raised, this issue is bubbling up from somewhere deeper than prefect I think, most likely with docker. Are you hardcoding a value of
    base_url
    in your docker storage?
    a

    Adam Roderick

    2 years ago
    We are passing local_image. If I understand right that is in place of
    base_url
    If I rewrite our deployment script to use
    flow.register
    and to use the Dockerfile approach instead of a base docker image, is there a chance that is more stable than
    flow.deploy
    and using a base image?
    Are there any verbosity settings in Prefect--or in docker that you may be aware of--that might shed more light on the error?
    Chris White

    Chris White

    2 years ago
    none that come to mind ā€” @josh have you ever seen this particular error before?
    j

    josh

    2 years ago
    Really weird, I have not seen this before. There is the Prefect config option for debug logging but Iā€™m not sure what else it would show you:
    [logging]
    level = "DEBUG"
    or
    export PREFECT__LOGGING__LEVEL="DEBUG"
    a

    Adam Roderick

    2 years ago
    The user does not have an account in Prefect Cloud yet -- that is my working hypothesis
    Unfortunately I am getting an error trying to add the user
    Arsenii

    Arsenii

    2 years ago
    Randomly bumped into the same issue:
    simplejson.errors.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
    . The error is indeed because I tried to
    flow.register(build=True)
    without running
    prefect auth login
    in CLI (or logging in inside the python script itself) beforehand. Maybe a better error would help others in future.