AttributeError:'UUID'对象没有属性'replace'

时间:2019-11-28 05:40:54

标签: python postgresql flask sqlalchemy

作为参考,我主要使用了这两种资源

AttributeError: 'UUID' object has no attribute 'replace' when using backend-agnostic GUID type https://websauna.org/docs/narrative/modelling/models.html#uuid-primary-keys

这似乎表明问题已解决,尽管我似乎无法使其正常工作。

我的错误与上面的SO帖子中的错误相同,但为彻底起见,它是:

ffmpeg -i A.wav -filter_complex "[0:a]channelsplit=channel_layout=stereo[left][right]" -map "[left]" B.wav -map "[right]" C.wav

我的模型如下:

 File "/Library/Frameworks/Python.framework/Versions/3.5/lib/python3.5/uuid.py", line 137, in __init__
    hex = hex.replace('urn:', '').replace('uuid:', '')
AttributeError: 'UUID' object has no attribute 'replace'

还有其他已知的解决方法吗?

1 个答案:

答案 0 :(得分:0)

hex = str(hex).replace('urn:','').replace('uuid:','')