V2EX = way to explore
V2EX 是一个关于分享和探索的地方
现在注册
已注册用户请  登录
推荐学习书目
Learn Python the Hard Way
Python Sites
PyPI - Python Package Index
http://diveintopython.org/toc/index.html
Pocoo
值得关注的项目
PyPy
Celery
Jinja2
Read the Docs
gevent
pyenv
virtualenv
Stackless Python
Beautiful Soup
结巴中文分词
Green Unicorn
Sentry
Shovel
Pyflakes
pytest
Python 编程
pep8 Checker
Styles
PEP 8
Google Python Style Guide
Code Style from The Hitchhiker's Guide
sunweiguo02
V2EX  ›  Python

使用 twilio 一直报错,求大牛们看下哪里出错了

  •  
  •   sunweiguo02 · 2017-01-24 11:42:31 +08:00 · 3202 次点击
    这是一个创建于 2657 天前的主题,其中的信息可能已经有所发展或是发生改变。
    完全没有头绪是怎么回事,谷歌也没查到什么。。。。。。

    代码如下:
    from twilio.rest import TwilioRestClient

    account_sid = "AC1051ad791e2819985cbf04e********"
    auth_token = "76f04e0a842f4a1b77162345a*******"
    client = TwilioRestClient(account_sid, auth_token)

    message = client.messages.create(
    body="Hello there!",
    from_="+1414622****",
    to="+861860963****")

    print message.sid


    报错:
    Traceback (most recent call last):
    File "C:\Users\sunwe\Desktop\WorkPlace of Python\Lesson03\send_text.py", line 3, in <module>
    import twilio
    File "C:/Users/sunwe/Desktop/WorkPlace of Python/Lesson03\twilio.py", line 3, in <module>
    AttributeError: 'module' object has no attribute '__version__'
    rust
        1
    rust  
       2017-01-24 15:19:20 +08:00
    你知道为什么没有人回答你吗?

    因为 Google 一下就能得出答案
    sunweiguo02
        2
    sunweiguo02  
    OP
       2017-01-24 19:09:39 +08:00 via Android
    @rust 我就是没谷歌到才发帖,有什么问题?
    关于   ·   帮助文档   ·   博客   ·   API   ·   FAQ   ·   我们的愿景   ·   实用小工具   ·   816 人在线   最高记录 6543   ·     Select Language
    创意工作者们的社区
    World is powered by solitude
    VERSION: 3.9.8.5 · 24ms · UTC 22:46 · PVG 06:46 · LAX 15:46 · JFK 18:46
    Developed with CodeLauncher
    ♥ Do have faith in what you're doing.