Skip to content

Library does not accept uuid.UUID as distinct_id, but Posthog uses UUIDs internally #25

@andreipopovici

Description

@andreipopovici

This threw me for a loop for a second. I had to str(myUUID) to be able to use it as the distinct_id in all calls.

Since the documentation often shows UUIDs and doesn't explain that distinct_id should be a Number or string_types, it might be worth adding uuid.UUID to ID_TYPES at https://github.com/PostHog/posthog-python/blob/master/posthog/client.py#L24

Of course, one would need to cast the UUID to str() as well.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions