Question: In my store locator page, google map appears for a few minutes and disappears , 
in console I get the error:

> 
> Google Maps JavaScript API error: RefererNotAllowedMapError
>  <https://developers.google.com/maps/documentation/javascript/error-messages#referer-not-allowed-map-error>
>  Your site URL to be authorized: <https://preprod.site.com/magasins>
> 
> 
> 

How could i resolve this issue?

Answer: 
make sure to flush before running just to make sure that there doesn't exist a list / stream with the same name. :

```
redis-cli flushall

```

```py
if __name__ == '__main__':
    r = redis.Redis(host='localhost', port=6379, db=0)
    encoder = JSONEncoder()
    sample = {"hello": encoder.encode([1234,125, 1235, 1235])} # converts list to string
    stream_name = 'mystream'

    for i in range(10):
        r.xadd(stream_name, sample)

    # "$" doesn't seem to work in python
    read_samples = r.xread({stream_name:b"0-0"})

```
Looking at the help (or the docstrings [(1)](https://github.com/andymccurdy/redis-py/blob/31519e4ccef49fb59254ee5524007c81faa7e850/redis/client.py#L2182-L2190), [(2)](https://github.com/andymccurdy/redis-py/blob/31519e4ccef49fb59254ee5524007c81faa7e850/redis/client.py#L1965-L1974)) for the functions, they're quite straightforward:

```
>>> import redis
>>> r = redis.Redis()
>>> help(r.xadd)
    xadd(name, fields, id='*', maxlen=None, approximate=True)

    Add to a stream.
    name: name of the stream
    fields: dict of field/value pairs to insert into the stream
    id: Location to insert this record. By default it is appended.
    maxlen: truncate old stream members beyond this size
    approximate: actual stream length may be slightly more than maxlen

>>> help(r.xread)
    xread(streams, count=None, block=None)

    Block and monitor multiple streams for new data.
    streams: a dict of stream names to stream IDs, where
               IDs indicate the last ID already seen.
    count: if set, only return this many items, beginning with the
           earliest available.
    block: number of milliseconds to wait, if nothing already present.

```