https://prefect.io logo
a

Adam Roderick

03/23/2020, 11:12 PM
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:
Copy code
\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:
Copy code
/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)
c

Chris White

03/23/2020, 11:59 PM
šŸ§ 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

03/24/2020, 12:27 AM
yeah, no traceback
c

Chris White

03/24/2020, 1:39 AM
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

03/24/2020, 1:42 AM
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
c

Chris White

03/24/2020, 1:46 AM
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

03/24/2020, 3:02 PM
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?
c

Chris White

03/25/2020, 2:10 PM
none that come to mind ā€” @josh have you ever seen this particular error before?
j

josh

03/25/2020, 2:12 PM
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:
Copy code
[logging]
level = "DEBUG"
or
Copy code
export PREFECT__LOGGING__LEVEL="DEBUG"
a

Adam Roderick

03/25/2020, 2:12 PM
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
a

Arsenii

06/01/2020, 10:01 AM
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.