Skip to content

get_snap incorrectly references random library #61

@BenjaminPelletier

Description

@BenjaminPelletier

On line 39 of stream.py, the rs parameter is set as follows:

'rs': ''.join(random.choices(string.ascii_uppercase + string.digits, k=10)),

However, the import statement on line 2 is

from random import random

With this import statement, the symbol random refers to the function rather than the library, and it is the library which has the choices function.

This problem causes a crash with AttributeError: 'builtin_function_or_method' object has no attribute 'choices' when get_snap is called.

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