Pygooglevoice TypeError: get() 得到了一个意外的关键字参数 'raw'

问题描述

我正在尝试使用 pygooglevoice 包发送 SMS 消息。我按照他们网站 http://sphinxdoc.github.io/pygooglevoice/index.html 上的安装说明进行操作(除了我使用 pip 而不是 easy_install 安装了该软件包)。然后我设置了帐户/密码文档并使用 http://sphinxdoc.github.io/pygooglevoice/examples.html#send-sms-messages 上提供的以下代码发送 SMS 消息。

但是,我收到一个 TypeError,说在名为 configparser.py 的文档中有一个名为“raw”的意外参数。任何人都可以帮助解释下面的错误消息并提出可能的解决方案吗?非常感谢!

TypeError                                 Traceback (most recent call last)
<ipython-input-75-590efd152ee6> in <module>
      3 
      4 voice = Voice()
----> 5 voice.login()
      6 
      7 phoneNumber = input('4437348572')

/opt/conda/lib/python3.8/site-packages/googlevoice/voice.py in login(self,email,passwd)
     58 
     59         if email is None:
---> 60             email = config.email
     61         if email is None:
     62             email = input('Email address: ')

/opt/conda/lib/python3.8/site-packages/googlevoice/conf.py in <lambda>(self)
     53     phoneType = property(phoneType)
     54     forwardingNumber = property(lambda self: self.get('forwardingNumber'))
---> 55     email = property(lambda self: self.get('email','auth'))
     56     password = property(lambda self: self.get('password','auth'))
     57     secret = property(lambda self: self.get('secret'))

/opt/conda/lib/python3.8/site-packages/googlevoice/conf.py in get(self,option,section)
     33     def get(self,section='gvoice'):
     34         try:
---> 35             return ConfigParser.get(self,section,option).strip() or None
     36         except NoOptionError:
     37             return

/opt/conda/lib/python3.8/configparser.py in get(self,raw,vars,fallback)
    797             return value
    798         else:
--> 799             return self._interpolation.before_get(self,value,800                                                   d)
    801 

/opt/conda/lib/python3.8/configparser.py in before_get(self,parser,defaults)
    393     def before_get(self,defaults):
    394         L = []
--> 395         self._interpolate_some(parser,L,defaults,1)
    396         return ''.join(L)
    397 

/opt/conda/lib/python3.8/configparser.py in _interpolate_some(self,accum,rest,map,depth)
    406     def _interpolate_some(self,407                           depth):
--> 408         rawval = parser.get(section,raw=True,fallback=rest)
    409         if depth > MAX_INTERPOLATION_DEPTH:
    410             raise InterpolationDepthError(option,rawval)

TypeError: get() got an unexpected keyword argument 'raw'```

解决方法

暂无找到可以解决该程序问题的有效方法,小编努力寻找整理中!

如果你已经找到好的解决方法,欢迎将解决方案带上本链接一起发送给小编。

小编邮箱:dio#foxmail.com (将#修改为@)

相关问答

Selenium Web驱动程序和Java。元素在(x,y)点处不可单击。其...
Python-如何使用点“。” 访问字典成员?
Java 字符串是不可变的。到底是什么意思?
Java中的“ final”关键字如何工作?(我仍然可以修改对象。...
“loop:”在Java代码中。这是什么,为什么要编译?
java.lang.ClassNotFoundException:sun.jdbc.odbc.JdbcOdbc...