https://flyte.org logo
#ask-the-community
Title
# ask-the-community
t

Tim Sheiner

03/22/2023, 8:49 PM
Hi! I'm trying to run the example in the docs here: https://docs.flyte.org/projects/cookbook/en/latest/getting_started/analytics.html# When I register and run on the demo sandbox I get this error:
Copy code
[1/1] currentAttempt done. Last Error: USER::Pod failed. No message received from kubernetes.
[ass5zvhclkmtr9hd55ks-n0-0] terminated with exit code (1). Reason [Error]. Message: 
trap>", line 688, in _load_unlocked
  File "<frozen importlib._bootstrap_external>", line 883, in exec_module
  File "<frozen importlib._bootstrap>", line 241, in _call_with_frames_removed
  File "/root/workflows/ex_analytics.py", line 4, in <module>
    import pycountry
ModuleNotFoundError: No module named 'pycountry'
Traceback (most recent call last):
  File "/usr/local/bin/pyflyte-fast-execute", line 8, in <module>
    sys.exit(fast_execute_task_cmd())
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1130, in __call__
    return self.main(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1055, in main
    rv = self.invoke(ctx)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 1404, in invoke
    return ctx.invoke(self.callback, **ctx.params)
  File "/usr/local/lib/python3.10/site-packages/click/core.py", line 760, in invoke
    return __callback(*args, **kwargs)
  File "/usr/local/lib/python3.10/site-packages/flytekit/bin/entrypoint.py", line 513, in fast_execute_task_cmd
    subprocess.run(cmd, check=True)
  File "/usr/local/lib/python3.10/subprocess.py", line 526, in run
    raise CalledProcessError(retcode, process.args,
subprocess.CalledProcessError: Command '['pyflyte-execute', '--inputs', '<s3://my-s3-bucket/metadata/propeller/flytesnacks-development-ass5zvhclkmtr9hd55ks/n0/data/inputs.pb>', '--output-prefix', '<s3://my-s3-bucket/metadata/propeller/flytesnacks-development-ass5zvhclkmtr9hd55ks/n0/data/0>', '--raw-output-data-prefix', '<s3://my-s3-bucket/data/7x/ass5zvhclkmtr9hd55ks-n0-0>', '--checkpoint-path', '<s3://my-s3-bucket/data/7x/ass5zvhclkmtr9hd55ks-n0-0/_flytecheckpoints>', '--prev-checkpoint', '""', '--dynamic-addl-distro', '<s3://my-s3-bucket/flytesnacks/development/TPFR2TGNNPMEAIZGLYXBVJ46S4======/scriptmode.tar.gz>', '--dynamic-dest-dir', '/root', '--resolver', 'flytekit.core.python_auto_container.default_task_resolver', '--', 'task-module', 'workflows.ex_analytics', 'task-name', 'clean_data']' returned non-zero exit status 1.
.
Anybody understand this?
m

Michael Tinsley

03/22/2023, 9:13 PM
Copy code
ModuleNotFoundError: No module named 'pycountry'
I’m guessing you’re using the default container image? If so you’ll need to build a custom image with your additional python dependencies
n

Niels Bantilan

03/22/2023, 10:26 PM
ahh, yeah that example won’t work on a remote Flyte cluster for the reason mentioned by @Michael Tinsley… you can use the flytekit image (e.g. here) as a base and create your own with
pycountry
installed. For a longer-term fix would you mind creating an issue for this? [flyte-docs] 👇 Basically we want all the examples to work out-of-the-box or have a pre-built image for you to work with.
t

Tim Sheiner

03/29/2023, 4:37 PM
Thanks for the feedback. Apologies for slow response on my part. I will try the fix AND file an issue.
Hmm, couldn't recreate.
84 Views