gawel / panoramisk

asyncio based library to play with asterisk
https://panoramisk.readthedocs.io/
MIT License
151 stars 50 forks source link

trying something simple from the example... #87

Closed bbrendon closed 4 years ago

bbrendon commented 4 years ago

Any idea why I can't get the example to execute? Maybe 3.6 isn't supported?

import asyncio
import panoramisk

manager = panoramisk.Manager(loop=asyncio.get_event_loop(),
                  host='ip',
                  username='user',
                  secret='secret')
$ python3.6 panoramisk.py
Traceback (most recent call last):
  File "panoramisk.py", line 5, in <module>
    import panoramisk
  File "/home/bbaumg/panoramisk.py", line 8, in <module>
    manager = panoramisk.Manager(loop=asyncio.get_event_loop(),
AttributeError: module 'panoramisk' has no attribute 'Manager'
gawel commented 4 years ago

newby python mistake. your script is called panoramisk.py so it became the panoramisk module instead of the lib. Rename it to panoramisk_test.py and remove the .pyc files in your folder.

bbrendon commented 4 years ago

Sorry about that. You're right about the newbie. Thanks.