UUID type not supported
See original GitHub issueHi,
I am using XlsxWriter to write Pandas dataframes to Excel but it fails with a TypeError when it hits a UUID field.
TypeError: Unsupported type <class 'uuid.UUID'> in write()
I’ve been manually converting all of my UUID columns in the dataframe to strings before converting to Excel, but this is a bit tedious.
I am using Python version 3.5 and XlsxWriter 0.9.4.
Simon
PS - I would do a pull request but I’m in a hurry and don’t know CI.
Basically, the fix I’m using now is:
In compatibility.py :
a) import uuid
b) add uuid.UUID to string types: str_types = (str, uuid.UUID)
and str_types = (basestring, uuid.UUID)
for Python 2.x
- In worksheets.py:
a) force a convert to string at the beginning of write_string using
string = str(string)
take care
Issue Analytics
- State:
- Created 7 years ago
- Comments:5 (4 by maintainers)
Top Results From Across the Web
First sign-in fails with the universal unique identifier (UUID ...
The universal unique identifier (UUID) type is not supported. Screenshot of the UUID type is not supported error message at the logon screen....
Read more >The universal unique identifier (UUID ... - The Windows Club
The universal unique identifier (UUID) type is not supported. The issue occurs mainly because Remote Procedure Call or RPC which enables the ...
Read more >The universal unique identifier (UUID) type is not supported
Upon attempting to sign into a system that has the image (physical or virtual), a user may see an error message with the...
Read more >"The universal unique identifier (UUID) type is not supported ...
During our Windows 10 testing, we noticed that some users would randomly come across the universal unique identifier (UUID) type is not ......
Read more >[FIX] The Group Policy Client Service Failed The Sign-in. The ...
The universal unique identifier (UUID) type is not supported. The Group Policy Client Service Failed The Sign-in. The Universal Unique ...
Read more >Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start FreeTop Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
Top GitHub Comments
@JonnyWaffles See initial prototype code for this on #631
Handling of UUIDs and other user defined data types is now supported in XlsxWriter >= 1.2.1.
See https://xlsxwriter.readthedocs.io/working_with_data.html#writing-user-defined-types and https://xlsxwriter.readthedocs.io/example_user_types1.html#ex-user-type1