cubewise-code / tm1py

TM1py is a Python package that wraps the TM1 REST API in a simple to use library.
http://tm1py.readthedocs.io/en/latest/
MIT License
190 stars 110 forks source link

connectionpool issue #1200

Closed jmliando closed 4 days ago

jmliando commented 5 days ago

Hi Marius

I tried to run samples_setup.py but had an issue with connectionpool.py as you can see in this screenshot. Can you please help me? Thank you

connectionpool_py

Version

I also try to use the check.py to check the connection but it is hanging after I put TM1 User.

check_py

MariusWirtz commented 5 days ago

Please try to run the simplest possible tm1py script in your pycharm environment. Like this:

from TM1py import TM1Service

tm1_params = {
    "address": "localhost",
    "port": 12354,
    "user": "admin",
    "password": "apple",
    "ssl": True,
}
with TM1Service(**tm1_params) as tm1:
    print(tm1.server.get_product_version())
    print(tm1.server.get_server_name())

Does that work?

jmliando commented 4 days ago

It is hang. image

MariusWirtz commented 4 days ago

If the Python never completes, it typically indicates an issue with the connection to the TM1 server. Here are some potential causes and their solutions:


1. Network Connectivity

2. Incorrect Connection Parameters


3. Timeout


4. TM1py Library Version


5. SSL Certificate Issue


6. Authentication Issues


Debugging Steps

  1. Enable Verbose Logging: Add the following code to capture more details:
    
    import logging
    logging.basicConfig(level=logging.DEBUG)