Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Python][Packaging] Windows wheels fail due to Cannot locate timezone 'UTC': Timezone database not found at "C:\Users\ContainerAdministrator\Downloads\tzdata" #36991

Closed
raulcd opened this issue Aug 2, 2023 · 2 comments · Fixed by #36996

Comments

@raulcd
Copy link
Member

raulcd commented Aug 2, 2023

Describe the bug, including details regarding any error messages, version, and platform.

I was trying to build Windows wheels on #36925 and found the following error:
https://github.com/ursacomputing/crossbow/actions/runs/5735683765/job/15543833056#step:9:774
It does seems that nightly Windows wheels have also been failing due to this for the last couple of days:

This seems to fail since: #36942 was merged.

 _________________ test_sequence_timestamp_from_int_with_unit __________________

    @pytest.mark.pandas
    def test_sequence_timestamp_from_int_with_unit():
        # TODO(wesm): This test might be rewritten to assert the actual behavior
        # when pandas is not installed
    
        data = [1]
    
        s = pa.timestamp('s')
        ms = pa.timestamp('ms')
        us = pa.timestamp('us')
        ns = pa.timestamp('ns')
    
        arr_s = pa.array(data, type=s)
        assert len(arr_s) == 1
        assert arr_s.type == s
>       assert repr(arr_s[0]) == (
            "<pyarrow.TimestampScalar: '1970-01-01T00:00:01'>"
        )

Python310\lib\site-packages\pyarrow\tests\test_convert_builtin.py:1355: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyarrow\scalar.pxi:537: in pyarrow.lib.TimestampScalar.__repr__
    ???
Python310\lib\site-packages\pyarrow\compute.py:262: in wrapper
    return func.call(args, options, memory_pool)
pyarrow\_compute.pyx:367: in pyarrow._compute.Function.call
    ???
pyarrow\error.pxi:144: in pyarrow.lib.pyarrow_internal_check_status
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   pyarrow.lib.ArrowInvalid: Cannot locate timezone 'UTC': Timezone database not found at "C:\Users\ContainerAdministrator\Downloads\tzdata"

pyarrow\error.pxi:100: ArrowInvalid
____________________________ test_timestamp_scalar ____________________________

    def test_timestamp_scalar():
>       a = repr(pa.scalar("0000-01-01").cast(pa.timestamp("s")))

Python310\lib\site-packages\pyarrow\tests\test_scalars.py:158: 
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _
pyarrow\scalar.pxi:537: in pyarrow.lib.TimestampScalar.__repr__
    ???
Python310\lib\site-packages\pyarrow\compute.py:262: in wrapper
    return func.call(args, options, memory_pool)
pyarrow\_compute.pyx:367: in pyarrow._compute.Function.call
    ???
pyarrow\error.pxi:144: in pyarrow.lib.pyarrow_internal_check_status
    ???
_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _

>   ???
E   pyarrow.lib.ArrowInvalid: Cannot locate timezone 'UTC': Timezone database not found at "C:\Users\ContainerAdministrator\Downloads\tzdata"

Component(s)

Packaging, Python

@raulcd
Copy link
Member Author

raulcd commented Aug 2, 2023

@danepitkin do you know if this is related to the pytz = pytest.importorskip("pytz") that we add on some of our tests?

@danepitkin
Copy link
Member

Yes, I believe so! I'm not super familiar with the root cause, but that's how I remember fixing these types of errors before.

AlenkaF pushed a commit that referenced this issue Aug 15, 2023
…abase (#36996)

### Rationale for this change

Some tests require a tz database, which Windows might not provide at the expected file location. Skip them if the tz db is not found.

### What changes are included in this PR?

* Tests skipped if tz db is not found

### Are these changes tested?

Yes

### Are there any user-facing changes?

No
* Closes: #36991

Authored-by: Dane Pitkin <dane@voltrondata.com>
Signed-off-by: AlenkaF <frim.alenka@gmail.com>
@AlenkaF AlenkaF added this to the 14.0.0 milestone Aug 15, 2023
loicalleyne pushed a commit to loicalleyne/arrow that referenced this issue Nov 13, 2023
…tz database (apache#36996)

### Rationale for this change

Some tests require a tz database, which Windows might not provide at the expected file location. Skip them if the tz db is not found.

### What changes are included in this PR?

* Tests skipped if tz db is not found

### Are these changes tested?

Yes

### Are there any user-facing changes?

No
* Closes: apache#36991

Authored-by: Dane Pitkin <dane@voltrondata.com>
Signed-off-by: AlenkaF <frim.alenka@gmail.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants