UPDATE:
I went back and looked at the Python module documentation you referenced 
again. Although it is true that the examples at the top of the page don't 
strictly match the 8-4-4-4-12 format, those at the bottom of the page do. 
Furthermore, it seems clear that the uuid.UUID() function is a Python one, 
as opposed to one created of hacked by Django. I don't see how that helps 
my immediate problem, but I thought I should clarify.



On Thursday, February 18, 2016 at 10:20:57 AM UTC-6, Malik Rumi wrote:
>
> James,
>
> I used csvkit csvkit.readthedocs.org/en/latest/index.html to convert the 
> csv to json.
>
> On Wednesday, February 17, 2016 at 7:05:59 PM UTC-6, James Schneider wrote:
>>
>>
>>> The uuid.UUID() function is somewhat forgiving when it comes to 
>> providing values. See https://docs.python.org/3.5/library/uuid.html. 
>> Does the UUID in your JSON data match any of those formats? The only common 
>> format for a UUID that I've seen that doesn't match any of those formats 
>> would be 'aaaaaaaa-aaaa-aaaa-aaaa-aaaaaaaaaaaa' which is a string that 
>> contains dashes, but no surrounding braces. I believe that's the format 
>> that is pulled when using UUID's from Django installations by default. I'm 
>> actually surprised the Python UUID library doesn't support it, but maybe 
>> it's one of those RFC things that specifies the formats that must be 
>> accepted.
>>
>
> Okay, THIS really bothers me for a couple of reasons. 1) Yes, my uuids are 
> in the 8-4-4-4-12 format. 2) Yes, this comes from using the uuidfield as 
> recommended in the docs 
> https://docs.djangoproject.com/es/1.9/ref/models/fields/#uuidfield 3) 
> You're right, this 8-4-4-4-12 format IS NOT on the Python docs page you 
> referred me to. 
>
> How can Django say this is based on the Python uuid module when it does 
> not comply? What GOOD is it if it does not comply? Now maybe there is some 
> internal workings that hack a valid Python format. My guess is UUID(
> 'urn:uuid:12345678-1234-5678-1234-567812345678'). It wouldn't be that 
> hard to strip off the urn:uuid, and I know for a fact, because I've seen it 
> with my own eyes, there is code to strip out the dashes. But essentially 
> you are saying that my problems are NOT JSON (which I had started to 
> suspect anyway, see 
> http://stackoverflow.com/questions/35463713/badly-formed-hexadecimal-uuid-string-error-in-django-fixture-json-uuid-conversi
>  
>  2nd Update. But you also seem to be saying this is not a bug, but a 
> 'feature', because Django knows their uuid format does not comply. But that 
> doesn't make sense to me. How is it to be effectively used without 
> universal Python compliance? Why isn't this lack of compliance documented? 
> What is the workaround, or does it just mean junk the Django uuid 
> altogether as not ready for prime time and save yourself days and days of 
> work, like the days I wasted all last week on this thing?!
>  
>

-- 
You received this message because you are subscribed to the Google Groups 
"Django users" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To post to this group, send email to [email protected].
Visit this group at https://groups.google.com/group/django-users.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/django-users/970c0131-01d8-4cad-af5b-a9b9ff249fb1%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Reply via email to