kahemker opened a new issue, #46080:
URL: https://github.com/apache/arrow/issues/46080

   ### Describe the bug, including details regarding any error messages, 
version, and platform.
   
   **Summary**
   
   I would like to migrate a project from conda to uv and it appears that when 
uv builds the environment, pyarrow can no longer write orc files that include 
datetimes with timezones.  I have confirmed the same problem exists even if you 
install pyarrow and polars with pip which makes me believe this related to the 
distributed wheels on Windows.  I have run 
`pyarrow.util.download_tzdata_on_windows()`.  The files downloaded successfully.
   
   [I created a minimum reproducible example 
here.](https://github.com/kahemker/pyarrow-orc-failure)
   
   Steps to recreate the problem.
   
   1. Clone the repo
   2. Run `uv sync` to install polars and pyarrow using pyproject.toml
   3. Run `uv run main.py`
   
   The error message is
   
   ```
   Traceback (most recent call last):
     File "W:\code\test_pyarrow\main.py", line 21, in <module>
       main()
     File "W:\code\test_pyarrow\main.py", line 17, in main
       writer.write(df.to_arrow().cast(table_schema))
     File "W:\code\test_pyarrow\.venv\Lib\site-packages\pyarrow\orc.py", line 
289, in write
       self.writer.write(table)
     File "pyarrow\\_orc.pyx", line 439, in pyarrow._orc.ORCWriter.write
     File "pyarrow\\error.pxi", line 92, in pyarrow.lib.check_status
   pyarrow.lib.ArrowException: Unknown error: Time zone file 
/usr/share/zoneinfo/GMT does not exist. Please install IANA time zone database 
and set TZDIR env.
   ```
   
   You can build the working conda environment by following these steps (again 
starting from the minimum reproducible example)
   
   1.  `conda env create -f environment.yml`
   2.  `conda activate test_pyarrow_conda`
   3.  `python main.py`
   
   The code will terminate successfully and the test.orc.snappy file will exist 
in the directory.
   
   **Platform**
   
   Windows 10 Pro, Version 10.0.19045, 64-bit
   Windows 11 Pro, 24H2, 26100.3775
   
   **Version**
   
   pyarrow-19.0.1
   polars-1.26.0
   uv 0.6.12 
(https://github.com/astral-sh/uv/commit/e4e03833fc430d44384362a121f2a24b49e0cb4a
 2025-04-02)
   
   **Python version**
   
   Python 3.12.9
   
   ### Component(s)
   
   Python


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: issues-unsubscr...@arrow.apache.org.apache.org

For queries about this service, please contact Infrastructure at:
us...@infra.apache.org

Reply via email to