Closed user1493 closed 5 years ago
Just now saw this thread about using Pickle.... this thread solved my issue with threads https://github.com/cubewise-code/tm1py/issues/176#issue-497637567
I recommend that you explore the tm1py samples. https://github.com/cubewise-code/tm1py-samples In your case you have too many with statements.
On Sep 25, 2019 9:33 AM, user1493 notifications@github.com wrote:
I have two method to get the cubes and get the dimensions:
Initially I call cubes() and then dim().
def cubes(self): with TM1Service(address=address, port=port, user=user, password=password, namespace=namespace, ssl=ssl, gateway=gateway) as tm1: print(tm1.cubes.get_all_names())
def dim(self): with TM1Service(address=address, port=port, user=user, password=password, namespace=namespace, ssl=ssl, gateway=gateway) as tm1: print(tm1.dimensions.get_all_names())
— You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHubhttps://github.com/cubewise-code/tm1py/issues/176?email_source=notifications&email_token=AEK7GZVRC4B7HG76IX23KKDQLIAL3A5CNFSM4IZ6WWV2YY3PNVWWK3TUL52HS4DFUVEXG43VMWVGG33NNVSW45C7NFSM4HNJLC7Q, or mute the threadhttps://github.com/notifications/unsubscribe-auth/AEK7GZSDZUJYB7J2IVVLTWLQLIAL3ANCNFSM4IZ6WWVQ.
Hi @user1493,
You need reuse the TM1Service instead of creating a new one in each method.
I have two method to get the cubes and get the dimensions:
Initially I call cubes() and then dim().