0

I'm trying to use the python library trackpy to trace some particles of wax. At the beginning of my code when I import the necessary libraries,

import numpy as np
import pandas as pd
from pandas import DataFrame, Series  # for convenience

import pims
import trackpy as tp

I get the following attribute error:

AttributeError: module 'inspect' has no attribute 'getmoduleinfo'

which occurs in line 8 of this block of code from the file try_numba.py from the trackpy library.

def __init__(self, func, fallback=None, autojit_kw=None):
    self.func = func
    # This covers a Python 2/3 change not covered by six
    try:
        self.func_name = func.__name__
    except AttributeError:
        self.func_name = func.func_name
    module_name = inspect.getmoduleinfo(
        six.get_function_globals(func)['__file__']).name
    module_name = '.'.join(['trackpy', module_name])
    self.module_name = module_name
    self.autojit_kw = autojit_kw
    if fallback is not None:
        self.ordinary = fallback
    else:
        self.ordinary = func

Anyone know what's going on? The majority of my code is dependent on this library.

  • hey Terris, have you checked if the versions of the respective packages you are loading are up-to-date? – Georges Dec 06 '17 at 14:58
  • Also you could double check if you have another installation somewhere? For the version: `tp.__version__` If all fails, please try a fresh install of trackpy. – Georges Dec 06 '17 at 15:01

0 Answers0