News & Announcements User Community Developer Community

Welcome to the RingCentral Community

Please note the community is currently under maintenance and is read-only.

Search
Make sure to review our Terms of Use and Community Guidelines.
  Please note the community is currently under maintenance and is read-only.
Home » Developers
ImportError: No module named observable in python test SMS,ImportError: No module named observable for SMS quick start
Tags: sdk
Mar 27, 2021 at 3:05pm   •   5 replies  •  0 likes
Vincent Lieffroy

I believe there is missing a folder and file (s) in the RingCentral directory of Github for the Python SDK. I follow this tutorial (SMS Quick Start): https://developers.ringcentral.com/guide/messaging/quick-start#python

I follow the steps outlined:

I am creating an app. Everything is fine.

I am importing the Python RingCentral DSK. Everything is fine.

I create and edit my sms.py file. There too all is well.

But when I run my sms.py file, I get this error message (last line):


ME-python-sdk% python sms.py


Traceback (most recent call last):


File "sms.py", line 1, in <module>


from ringcentral import SDK


File "/Users/ME/ringcentral-python-sdk/ringcentral/__init__.py", line 4, in <module>


from .sdk import SDK


File "/Users/ME/ringcentral-python-sdk/ringcentral/sdk.py", line 4, in <module>


from .platform import Platform


File "/Users/ME/ringcentral-python-sdk/ringcentral/platform/__init__.py", line 5, in <module>


from .platform import Platform


File "/Users/ME/ringcentral-python-sdk/ringcentral/platform/platform.py", line 5, in <module>


from observable import Observable


ImportError: No module named observable



Indeed there is no Observable file / folder

,

But I believe there is missing a folder and file (s) in the RingCentral directory of Github for the Python SDK. I follow this tutorial (SMS Quick Start): https://developers.ringcentral.com/guide/messaging/quick-start#python

I follow the steps outlined:

I am creating an app. Everything is fine.

I am importing the Python RingCentral DSK. Everything is fine.

I create and edit my sms.py file. There too all is well.

But when I run my sms.py file, I get this error message (last line):


ringcentral-python-sdk % python sms.py

Traceback (most recent call last):

File "sms.py", line 1, in <module>

from ringcentral import SDK

File "/Users/ME/ringcentral-python-sdk/ringcentral/__init__.py", line 4, in <module>

from .sdk import SDK

File "/Users/ME/ringcentral-python-sdk/ringcentral/sdk.py", line 4, in <module>

from .platform import Platform

File "/Users/ME/ringcentral-python-sdk/ringcentral/platform/__init__.py", line 5, in <module>

from .platform import Platform

File "/Users/ME/ringcentral-python-sdk/ringcentral/platform/platform.py", line 5, in <module>

from observable import Observable

ImportError: No module named observable


Indeed there is no Observable file / folder

5 Answers
answered on Apr 5, 2021 at 1:24pm  

Thanks Anirban, i succeeded in running the demo described here https://github.com/grokify/ringcentral-demos-oauth/tree/master/python-bottle until I click on the button on the web page

RingCentral 3-Legged OAuth Demo in Python,

then I have this message : did i miss something ? Thanks in advance

{
  "error" : "invalid_client",
  "errors" : [ {
    "errorCode" : "OAU-113",
    "message" : "No redirect uri is registered for the client"
  } ],
  "error_description" : "No redirect uri is registered for the client"
}

 0
answered on Apr 5, 2021 at 1:15pm  

Thanks Phong Vu for underlying the two different errors. I did not understand those, hence my previous answer. Of course If i understood I would not have written this answer.

This is clear now, i understand what the problems are. I'll follow your advice to log with the user credentials. I am looking for the library 'Observable', is it in https://github.com/ringcentral/ringcentral-python ? I am unable to locate it.


 0
answered on Mar 28, 2021 at 1:23pm  

Based on your "ImportError: No module named observable" , can you please check this similar installation issue :

https://community.ringcentral.com/questions/7978/ringcentral-import-error-in-python.html

also you can refer: https://github.com/ringcentral/ringcentral-python to start with.

Hope that help


 0
answered on Mar 29, 2021 at 5:40am  
,

Hi !Thanks but it still does not work.


ME@vincent ringcentral-python-sdk % python3 ringout.py

Traceback (most recent call last):

File "/Users/ME/ringcentral-python-sdk/ringcentral/http/client.py", line 28, in send

response.response().raise_for_status()

File "/Library/Frameworks/Python.framework/Versions/3.9/lib/python3.9/site-packages/requests/models.py", line 943, in raise_for_status

raise HTTPError(http_error_msg, response=self)

requests.exceptions.HTTPError: 400 Client Error: Bad Request for url: https://platform.devtest.ringcentral.com/restapi/oauth/token


During handling of the above exception, another exception occurred:


Traceback (most recent call last):

File "/Users/ME/ringcentral-python-sdk/ringout.py", line 15, in <module>

platform.login(RINGCENTRAL_USERNAME, RINGCENTRAL_EXTENSION, RINGCENTRAL_PASSWORD)

File "/Users/ME/ringcentral-python-sdk/ringcentral/platform/platform.py", line 106, in login

raise e

File "/Users/ME/ringcentral-python-sdk/ringcentral/platform/platform.py", line 100, in login

response = self._request_token(TOKEN_ENDPOINT, body=body)

File "/Users/ME/ringcentral-python-sdk/ringcentral/platform/platform.py", line 173, in _request_token

return self.send_request(request, skip_auth_check=True)

File "/Users/ME/ringcentral-python-sdk/ringcentral/platform/platform.py", line 149, in send_request

return self._client.send(self.inflate_request(request, skip_auth_check=skip_auth_check))

File "/Users/ME/ringcentral-python-sdk/ringcentral/http/client.py", line 34, in send

raise ApiException(response, e)

ringcentral.http.api_exception.ApiException: Invalid resource owner credentials


I guess this is a credential issue ?


 0
answered on Mar 29, 2021 at 7:58am  

Your first problem and second problem are completely different. Don't say "...Thanks but it still does not work."

Your first problem was the "Observable" module was not installed. Simply install the missing lib and try again.

Your second problem is purely about wrong username/password. All you need is to make sure the username, password and extension number (if specified) must be correct. One way to check is to login your account service web (remove the "devtest" if login your production account). If you can login that page with the user credentials, you should be able to login your app using the same credentials.


 0



A new Community is coming to RingCentral!

Posts are currently read-only as we transition into our new platform.

We thank you for your patience
during this downtime.

Try Workflow Builder

Did you know you can easily automate tasks like responding to SMS, team messages, and more? Plus it's included with RingCentral Video and RingEX plans!

Try RingCentral Workflow Builder

PRODUCTS
RingEX
Message
Video
Phone
OPEN ECOSYSTEM
Developer Platform
APIs
Integrated Apps
App Gallery
Developer support
Games and rewards

RESOURCES
Resource center
Blog
Product Releases
Accessibility
QUICK LINKS
App Download
RingCentral App login
Admin Portal Login
Contact Sales
© 1999-2024 RingCentral, Inc. All rights reserved. Legal Privacy Notice Site Map Contact Us