[New-bugs-announce] [issue31888] Creating a UUID with a list throws bad exception

Tilman Krummeck report at bugs.python.org
Sat Oct 28 01:40:10 EDT 2017

New submission from Tilman Krummeck <tilman.krummeck at googlemail.com>:

I found a problem by accident on Python 3.5.3 with the uuid library.

Running this:

from uuid import UUID

This throws an AttributeError:
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "C:\Users\Tilman Krummeck\AppData\Local\Programs\Python\Python35-32\lib\uuid.py", line 137, in __init__
    hex = hex.replace('urn:', '').replace('uuid:', '')
AttributeError: 'list' object has no attribute 'replace'

This is for sure not intended to work, but should throw a type error in my opinion even before trying to create that UUID object.

components: Library (Lib)
messages: 305148
nosy: TilmanKrummeck
priority: normal
severity: normal
status: open
title: Creating a UUID with a list throws bad exception
type: behavior
versions: Python 3.5

Python tracker <report at bugs.python.org>

More information about the New-bugs-announce mailing list