Question

Trouble Installing Python JQL Library

  • 14 November 2020
  • 0 replies
  • 28 views

Badge +2

Hi there!

 

Apparently, there is a JQL library for Python 3 (https://pypi.org/project/mixpanel-jql/).

I’m trying to install it using anaconda prompt, which seems to work. However, upon running my query (below) I get an error message that there is no module named ‘mixpanel_jql’.

 

Is there something I’m missing?

 

Thank you!

 

Robyn

---------------------------------------------------------

from mixpanel_jql import JQL, Reducer, Events
from datetime import datetime

api_secret = 'XXXXXXXXXXXXXXXX'

query = JQL(
    api_secret,
    events = Events({
        'event_selectors': [{'event': "File Open"  }],
        'from_date' : datetime(2020,10,29),
        'to_date' : datetime(2020,11,1)
    
        })
    ).group_by_user(
        keys = ["new Date(e.time).toISOString().split('T')[0]",
                ],
        accumulator= "function(){ return 1;}"
        ).group_by(
            keys=["e.key.slice(1)"],
            accumulator= Reducer.null()
            
        ) 

 

Result message: 

ModuleNotFoundError: No module named 'mixpanel_jql'


0 replies

Be the first to reply!

Reply