-
Notifications
You must be signed in to change notification settings - Fork 74
Support of Python 3.8. #123
Comments
I faced a similar issue but it was when I tried to add a timedelta to a pyxb.binding.datatypes.date object. Worked around by calling .date() on the pyxb object tp get the datetime.date which worked in my instance |
Add additional valid fields.
still an issue today with PyXB 1.2.5. so the proposed by @AntonDeMeester fix here works great still. |
I can confirm the fix from above works as well. If anyone runs into any issues with "binding" module not existing, I only made two edits which are the import and customdate class.
|
can you share the code which is the fixing one, been struck to this past 2 days. |
this fork worked as a drop in replacement for me https://github.com/renalreg/PyXB-X |
I am sharing my code here, i ain't getting any response from authorize, i pip installed yours and its not charging any idea ??? |
Ok i sorted it out, It wasn't on production, this works, thanks for the module. its a shame that these guys haven't worked into this since 2020. |
When I'm running PyXB on Python 3.8, I get an error when using the date field. I get a type error that there are too many arguments in the date datatype.
I've narrow it down, to the
XsdLiteral
method in the date class. Here 12 hours is added to the date field. But, it creates a newdatatypes.date
instance again. And because the new value is a datetime field (with the added 12 hours), the__new__
method throws an error as it has too many input items (year, month, day, hour, minute, second, microsecond and TZ).Line in particular (datatypes.py 761)
I've kind of solved the problem by overwriting the PyXB date class to remove args if they are exactly like we expect (12, 0, 0 , 0, None) as below. But I think that PyXB should solve the problem in a more structural way.
Stacktrace of the error
The text was updated successfully, but these errors were encountered: