Resolving AttributeError: __name__ ??

I am trying to connect to Microstrategy REST API server using below code of
But the import “from mstrio.cube import Cube” giving me AttributeError: name
The code runs fine in python. Even if i save the script as external and call from its running. Direct running from is throwing me this error.
Can anyone please help to fix it? code

from django.shortcuts import render
from mstrio.connection import Connection
from mstrio.cube import Cube

def home(request):
return render(request,‘home.html’,{“name”: “Saoni”})

def location (request):
location= request.POST.get(‘param3’)
base_url = “
project_id = “2024B3DA11EAB4FA27A20080EF65F523” # hardcoded projectid
cube_id = “EA64A05E4D2184B18E7F2D830D2C9CFE” # hardcoded cubeid
conn = Connection(base_url, mstr_username, mstr_password, project_id=project_id)
my_cube =Cube(connection=conn, cube_id=cube_id)
alldata= mstr_username+mstr_password+location+‘success’
return render(request,“home.html”,{‘data’: alldata})

Can you post the complete traceback from the error you’re getting? You probably also want to verify that the parameters you’re receiving from the POST are what you expect them to be.