Greg
11/21/2023, 6:00 PMRuntimeError: Unable to find any timezone configuration
) with prefect==2.14.5 when just trying to import from prefect (e.g. from prefect import task
)? @Prefect is this expected behavior?Greg
11/21/2023, 6:02 PMTZ
env var (e.g. TZ=UTC
), but an import triggering a runtime error isn't idealAlexander Azzam
11/21/2023, 6:09 PMGreg
11/21/2023, 6:45 PMFROM ubuntu:22.04
RUN apt-get update && \
DEBIAN_FRONTEND=noninteractive apt-get install -y --no-install-recommends \
python3 \
python3-pip && \
apt-get autoremove -y && \
apt-get clean && \
rm -rf /var/lib/apt/lists/*
RUN pip install prefect==2.14.5
CMD ["/usr/bin/python3", "-c", "from prefect import task"]
Greg
11/22/2023, 5:46 PMTraceback (most recent call last):
File "<string>", line 1, in <module>
File "/usr/local/lib/python3.10/dist-packages/prefect/__init__.py", line 37, in <module>
from prefect.runner import Runner, serve
File "/usr/local/lib/python3.10/dist-packages/prefect/runner/__init__.py", line 1, in <module>
from .runner import Runner, serve
File "/usr/local/lib/python3.10/dist-packages/prefect/runner/runner.py", line 59, in <module>
from prefect.client.orchestration import get_client
File "/usr/local/lib/python3.10/dist-packages/prefect/client/orchestration.py", line 32, in <module>
import prefect.settings
File "/usr/local/lib/python3.10/dist-packages/prefect/settings.py", line 658, in <module>
PREFECT_CLOUD_URL = Setting(
File "/usr/local/lib/python3.10/dist-packages/prefect/settings.py", line 143, in __init__
generate_deprecation_message(
File "/usr/local/lib/python3.10/dist-packages/prefect/_internal/compatibility/deprecated.py", line 69, in generate_deprecation_message
parsed_start_date = pendulum.from_format(start_date, DEPRECATED_DATEFMT)
File "/usr/local/lib/python3.10/dist-packages/pendulum/__init__.py", line 259, in from_format
parts = _formatter.parse(string, fmt, now(), locale=locale)
File "/usr/local/lib/python3.10/dist-packages/pendulum/__init__.py", line 211, in now
dt = _datetime.datetime.now(local_timezone())
File "/usr/local/lib/python3.10/dist-packages/pendulum/tz/__init__.py", line 60, in local_timezone
return get_local_timezone()
File "/usr/local/lib/python3.10/dist-packages/pendulum/tz/local_timezone.py", line 35, in get_local_timezone
tz = _get_system_timezone()
File "/usr/local/lib/python3.10/dist-packages/pendulum/tz/local_timezone.py", line 63, in _get_system_timezone
return _get_unix_timezone()
File "/usr/local/lib/python3.10/dist-packages/pendulum/tz/local_timezone.py", line 242, in _get_unix_timezone
raise RuntimeError("Unable to find any timezone configuration")
RuntimeError: Unable to find any timezone configuration