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

OSError: [Errno 22] Invalid argument on call to pywintypes.Time(0) #592

Closed
Colin-b opened this Issue Dec 5, 2016 · 1 comment

Comments

Projects
None yet
2 participants
@Colin-b
Contributor

Colin-b commented Dec 5, 2016

Hi,

The following line within _xlwindows.py is failing with Python 3.6.
time_types = (dt.date, dt.datetime, type(pywintypes.Time(0)))

Here is the issue:

Python 3.6.0b4 (default, Nov 22 2016, 05:30:12) [MSC v.1900 64 bit (AMD64)] on win32

import pywintypes

pywintypes.TimeType

<class 'pywintypes.datetime'>

pywintypes.Time(0)

Traceback (most recent call last):
File "", line 1, in
OSError: [Errno 22] Invalid argument

I am not sure what to do here exactly, the comment before this line of code is saying the following:

Time types: pywintypes.timetype doesn't work on Python 3

Is it a known issue?
If so should we use pywintypes.TimeType instead?
Only for Python3?
Or only in case of failure?

Anyway this issue is preventing to use xlwings on my setup with Python 3.6

Best Regards

@fzumstein fzumstein added the bug label Dec 6, 2016

fzumstein added a commit that referenced this issue Dec 6, 2016

@fzumstein

This comment has been minimized.

Member

fzumstein commented Dec 6, 2016

pywintypes.TimeType seems indeed to be the correct solution, I fixed it on develop

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment