-
Notifications
You must be signed in to change notification settings - Fork 115
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Problem connecting using windows laptop on company network, ok on mac #917
Comments
What version of urblib3 are you running? |
pip freeze reports 2.0.2 on pc on macbook, it's 1.2.11 i just ran this command to downgrade it to 1.2.11 on the pc Voila - tmypy can now connect! thanks for your help. |
This issue is due to a breaking change in urllib3 urllib3/urllib3#2648 The function I will provide a fix for this. TM1py can implement the |
Hello,
I'm just installing tm1py and trying to do a simple connection. I can run the following test on my macbook not on vpn or company locked down windows pc:
from TM1py import TM1Service
with TM1Service(
base_url="https://esnonprod.planning-analytics.cloud.ibm.com/tm1/api/QUBEPROD/",
user="companysite_tm1_automation",
namespace="LDAP",
password="mypassword",
ssl=True,
verify=True,
async_requests_mode=True) as tm1:
print(tm1.server.get_product_version())
However, when I try to run it on the windows pc, I get these errors. I have tried changing the site and/or the password, and I get different results. I can see from tm1login.log that it is connecting. On macbook, running python3.9. have tried with both 3.9 and 3.10 on pc. Any ideas?
Error output
Traceback (most recent call last):
File "C:\Users\lobelj\Downloads\tm1py-samples-master\tm1py-samples-master\testcon2.py", line 3, in
with TM1Service(
File "C:\Users\lobelj\AppData\Local\Programs\Python\Python310\lib\site-packages\TM1py\Services\TM1Service.py", line 16, in init
self._tm1_rest = RestService(**kwargs)
File "C:\Users\lobelj\AppData\Local\Programs\Python\Python310\lib\site-packages\TM1py\Services\RestService.py", line 226, in init
self.connect()
File "C:\Users\lobelj\AppData\Local\Programs\Python\Python310\lib\site-packages\TM1py\Services\RestService.py", line 246, in connect
self._start_session(
File "C:\Users\lobelj\AppData\Local\Programs\Python\Python310\lib\site-packages\TM1py\Services\RestService.py", line 420, in _start_session
response = self.GET(url=url, headers=additional_headers)
File "C:\Users\lobelj\AppData\Local\Programs\Python\Python310\lib\site-packages\TM1py\Services\RestService.py", line 85, in wrapper
response = self.build_response_from_raw_bytes(response.content)
File "C:\Users\lobelj\AppData\Local\Programs\Python\Python310\lib\site-packages\TM1py\Services\RestService.py", line 619, in build_response_from_raw_bytes
urllib_response = RestService.urllib3_response_from_bytes(data)
File "C:\Users\lobelj\AppData\Local\Programs\Python\Python310\lib\site-packages\TM1py\Services\RestService.py", line 615, in urllib3_response_from_bytes
return urllib3.HTTPResponse.from_httplib(response)
AttributeError: type object 'HTTPResponse' has no attribute 'from_httplib'
The text was updated successfully, but these errors were encountered: