Hi, Can someone please help me with the - RuntimeE...
# prefect-community
j
Hi, Can someone please help me with the - RuntimeError: Unable to find any timezone configuration? I have Helm Dask chart installed on AWS EKS cluster. The deployment has two load balancer services that expose dask-scheduler and Jupyter notebook. I am trying to register the flow to the prefect cloud from the deployed Jupyter Notebook. The workflow runs fine on the dask-scheduler. self._access_token_expires_at is part of the init so I can't set the timezone.
Copy code
self._access_token_expires_at = pendulum.now()
Copy code
RuntimeError                              Traceback (most recent call last)
<ipython-input-5-fa84dadfda8e> in <module>
----> 1 flow.register("prefect-workflow")

/opt/conda/lib/python3.8/site-packages/prefect/core/flow.py in register(self, project_name, build, labels, set_schedule_active, version_group_id, no_url, idempotency_key, **kwargs)
   1658             self.result = self.storage.result
   1659 
-> 1660         client = prefect.Client()
   1661 
   1662         registered_flow = client.register(

/opt/conda/lib/python3.8/site-packages/prefect/client/client.py in __init__(self, api_server, api_token)
     92         self._access_token = None
     93         self._refresh_token = None
---> 94         self._access_token_expires_at = pendulum.now()
     95         self._active_tenant_id = None
     96         self._attached_headers = {}  # type: Dict[str, str]

/opt/conda/lib/python3.8/site-packages/pendulum/__init__.py in now(tz)
    209 
    210     if tz is None or tz == "local":
--> 211         dt = _datetime.datetime.now(local_timezone())
    212     elif tz is UTC or tz == "UTC":
    213         dt = _datetime.datetime.now(UTC)

/opt/conda/lib/python3.8/site-packages/pendulum/tz/__init__.py in local_timezone()
     58     Return the local timezone.
     59     """
---> 60     return get_local_timezone()

/opt/conda/lib/python3.8/site-packages/pendulum/tz/local_timezone.py in get_local_timezone()
     33 
     34     if _local_timezone is None:
---> 35         tz = _get_system_timezone()
     36 
     37         _local_timezone = tz

/opt/conda/lib/python3.8/site-packages/pendulum/tz/local_timezone.py in _get_system_timezone()
     61         return _get_darwin_timezone()
     62 
---> 63     return _get_unix_timezone()
     64 
     65 

/opt/conda/lib/python3.8/site-packages/pendulum/tz/local_timezone.py in _get_unix_timezone(_root)
    240         return TimezoneFile(tzpath)
    241 
--> 242     raise RuntimeError("Unable to find any timezone configuration")
    243 
    244 

RuntimeError: Unable to find any timezone configuration
I get a similar error when I run: import pendulum pendulum.now()