TypeError: ‘unicode’ object is not callable

today used wechatpy to write the official account number to login and authorize. When obtaining the authorized login address, it uses the instantiated object to call the method directly, and the result is reported this error. p>

Traceback (most recent call last):
 File "C:\Python27\lib\site-packages\flask\app.py", line 1994, in __call__
  return self.wsgi_app(environ, start_response)
 File "C:\Python27\lib\site-packages\flask\app.py", line 1985, in wsgi_app
  response = self.handle_exception(e)
 File "C:\Python27\lib\site-packages\flask\app.py", line 1540, in handle_exception
  reraise(exc_type, exc_value, tb)
 File "C:\Python27\lib\site-packages\flask\app.py", line 1982, in wsgi_app
  response = self.full_dispatch_request()
 File "C:\Python27\lib\site-packages\flask\app.py", line 1614, in full_dispatch_request
  rv = self.handle_user_exception(e)
 File "C:\Python27\lib\site-packages\flask\app.py", line 1517, in handle_user_exception
  reraise(exc_type, exc_value, tb)
 File "C:\Python27\lib\site-packages\flask\app.py", line 1612, in full_dispatch_request
  rv = self.dispatch_request()
 File "C:\Python27\lib\site-packages\flask\app.py", line 1598, in dispatch_request
  return self.view_functions[rule.endpoint](**req.view_args)
 File "E:\lightboat\ZhanLu\zhanlu\v0_1\login\api.py", line 41, in home
  qrurl = wxpay_api.qrconnect_url()
TypeError: 'unicode' object is not callable

after careful study, it was found that qrconnect_ URL is a property, not a method, so I report this error, can’t use string as a method

Similar Posts: