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 109 forks source link

ModuleNotFoundError: No module named 'TM1py' #250

Closed hmenda closed 4 years ago

hmenda commented 4 years ago

I am using Pycharm for TM1py. I am getting below error while running a samples provided in the https://github.com/cubewise-code/TM1py-samples

Script I ran: from TM1py import TM1Service

ADDRESS = "localhost" PORT = 8111 USER = "admin" PASSWORD = "apple" SSL = True

with TM1Service(address=ADDRESS, port=PORT, user=USER, password=PASSWORD) as tm1: c = tm1.cubes.get('PNLCube') print(c) print(c.dimensions) if c.has_rules: print(c.rules)

d_names = tm1.dimensions.get('account1')
print(d_names)

Error screenshot image

Note: The above script is working in other text editors like Sublime and atom.

hmenda commented 4 years ago

I tried installing Pycharm again and selected my base interpreter as my installed version. It's working now.