from_formula() throws error - problem installing #1021

Closed
urschrei opened this Issue Aug 4, 2013 · 40 comments

Projects

None yet

5 participants

@urschrei
urschrei commented Aug 4, 2013

When trying to use sm.ols(), I'm getting an error in 0.5:

I'm using this example:
http://statsmodels.sourceforge.net/devel/examples/notebooks/generated/example_formulas.html
First, I'm grabbing the data, and cleaning it:

In [8]: df.head()
Out[8]: 
   Lottery  Literacy  Wealth Region
0       41        37      73      E
1       38        51      22      N
2       66        13      61      C
3       80        46      76      E
4       79        69      83      E

But calling mod = ols(formula='Lottery ~ Literacy + Wealth + Region', data=df) gives me

In [7]: mod = ols(formula='Lottery ~ Literacy + Wealth + Region', data=df)
---------------------------------------------------------------------------
TypeError                                 Traceback (most recent call last)
<ipython-input-7-2b18d1ef9f2f> in <module>()
----> 1 mod = ols(formula='Lottery ~ Literacy + Wealth + Region', data=df)

TypeError: from_formula() takes at least 3 arguments (2 given)

Am I doing something wrong?

@vincentarelbundock
Member

Can you paste the full code? I can't replicate. On the latest github master, this example runs well for me.

@urschrei
urschrei commented Aug 5, 2013

I used the version (0.5) installed using pip. I'll try again using master.

@jseabold
Member
jseabold commented Aug 5, 2013

This is likely a version issue. Try to upgrade to the latest release candidate version on git. The data argument was renamed from df.

Sent from my mobile

On Aug 4, 2013, at 8:13 PM, Stephan Hügel notifications@github.com wrote:

I used the version (0.5) installed using pip. I'll try again using master.


Reply to this email directly or view it on GitHub.

@urschrei
urschrei commented Aug 5, 2013

This is what I get when I try to pip install 2d4aad9:

Unpacking /Users/sth/dev/statsmodels
Running setup.py egg_info for package from file:///Users/sth/dev/statsmodels
Traceback (most recent call last):
File "<string>", line 16, in <module>
File "/var/folders/_c/zcglb9q90yg8dhqflsrv25m00000gn/T/pip-l7DdxN-build/setup.py", line 488, in <module>
package_data["statsmodels.datasets.tests"].append("*.zip")
KeyError: 'statsmodels.datasets.tests'
Complete output from command python setup.py egg_info:
Traceback (most recent call last):
File "<string>", line 16, in <module>

File "/var/folders/_c/zcglb9q90yg8dhqflsrv25m00000gn/T/pip-l7DdxN-build/setup.py", line 488, in <module>

package_data["statsmodels.datasets.tests"].append("*.zip")

KeyError: 'statsmodels.datasets.tests'

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /var/folders/_c/zcglb9q90yg8dhqflsrv25m00000gn/T/pip-l7DdxN-build
Storing complete log in /Users/sth/.pip/pip.log
@jseabold
Member
jseabold commented Aug 5, 2013

Can you give us some more information? This works fine for me.

pip install https://pypi.python.org/packages/source/s/statsmodels/statsmodels-0.5.0rc1.tar.gz

@urschrei
urschrei commented Aug 5, 2013

That gives me the exact same error as above:

(venv)sth:~/dev/linalg (master u=) $ pip install https://pypi.python.org/packages/source/s/statsmodels/statsmodels-0.5.0rc1.tar.gz
Downloading/unpacking https://pypi.python.org/packages/source/s/statsmodels/statsmodels-0.5.0rc1.tar.gz
  Downloading statsmodels-0.5.0rc1.tar.gz (5.5MB): 5.5MB downloaded
  Storing download in cache at /users/sth/pip-cache/https%3A%2F%2Fpypi.python.org%2Fpackages%2Fsource%2Fs%2Fstatsmodels%2Fstatsmodels-0.5.0rc1.tar.gz
  Running setup.py egg_info for package from https://pypi.python.org/packages/source/s/statsmodels/statsmodels-0.5.0rc1.tar.gz
     Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/var/folders/c4/b4bkth795ylgm792w10q3pq00000gn/T/pip-O1Vo85-build/setup.py", line 488, in <module>
        package_data["statsmodels.datasets.tests"].append("*.zip")
    KeyError: 'statsmodels.datasets.tests'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/var/folders/c4/b4bkth795ylgm792w10q3pq00000gn/T/pip-O1Vo85-build/setup.py", line 488, in <module>

    package_data["statsmodels.datasets.tests"].append("*.zip")

KeyError: 'statsmodels.datasets.tests'

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /var/folders/c4/b4bkth795ylgm792w10q3pq00000gn/T/pip-O1Vo85-build
Storing complete log in /Users/sth/.pip/pip.log

I'm on OS X 10.8.4, using Python 2.7.5 in a virtualenv, with the latest distribute, pandas, numpy, matplotlib, scipy, IPython packages installed using pip.

@josef-pkt
Member

can you check if
"/var/folders/c4/b4bkth795ylgm792w10q3pq00000gn/T/pip-O1Vo85-build"
has the statsmodels directories, specifically statsmodels.datasets

to me it looks like get_data_files() is not finding the paths to add to the package_data dict.

Another possibility that usually works as fall back:
unzip the tar.gz source file and call setup.py install directly (using the python executable from the virtualenv)

@jseabold
Member
jseabold commented Aug 5, 2013

Hmm, what do you mean by latest distribute? Distribute has been re-merged back into setuptools and I haven't tried installing with distribute lately. I was able to install fine in a virtualenv using pip and setuptools 0.9.8 and the below versions

INSTALLED VERSIONS
------------------
Python: 2.7.4.final.0
OS: Linux 3.5.0-36-generic #57-Ubuntu SMP Wed Jun 19 15:10:49 UTC 2013 x86_64
byteorder: little
LC_ALL: None
LANG: en_US.UTF-8

Statsmodels
===========

Installed: 0.5.0 (/home/skipper/virtualenv/statsmodels-pip/local/lib/python2.7/site-packages/statsmodels)

Required Dependencies
=====================

cython: Not installed
numpy: 1.8.0.dev-645b9f5 (/home/skipper/virtualenv/statsmodels-pip/local/lib/python2.7/site-packages/numpy)
scipy: 0.13.0.dev-caeec3f (/home/skipper/virtualenv/statsmodels-pip/local/lib/python2.7/site-packages/scipy)
pandas: 0.12.0-82-g6ae36e4 (/home/skipper/virtualenv/statsmodels-pip/local/lib/python2.7/site-packages/pandas-0.12.0_82_g6ae36e4-py2.7-linux-x86_64.egg/pandas)
    dateutil: 2.1 (/home/skipper/virtualenv/statsmodels-pip/local/lib/python2.7/site-packages/python_dateutil-2.1-py2.7.egg/dateutil)
patsy: 0.1.0+dev (/home/skipper/virtualenv/statsmodels-pip/local/lib/python2.7/site-packages/patsy-0.1.0_dev-py2.7.egg/patsy)

My only guess is that there's something going on with this version of distribute or that there is somehow some leftover package issues. Have you tried/can you try in a fresh virtualenv?

@urschrei
urschrei commented Aug 5, 2013

Sorry, I should clarify. I've installed distribute because the installation process on some packages (matplotlib, off the top of my head) requires its presence – I'm installing using pip.
Anyway, running setup.py install using the virtualenv python as per @josef-pkt's suggestion gives me a different error:

running install
running bdist_egg
running egg_info
creating statsmodels.egg-info
writing statsmodels.egg-info/PKG-INFO
writing top-level names to statsmodels.egg-info/top_level.txt
writing dependency_links to statsmodels.egg-info/dependency_links.txt
writing manifest file 'statsmodels.egg-info/SOURCES.txt'
package init file 'statsmodels/tsa/vector_ar/data/__init__.py' not found (or not a regular file)
reading manifest file 'statsmodels.egg-info/SOURCES.txt'
reading manifest template 'MANIFEST.in'
warning: no previously-included files matching '*' found under directory 'dist'
warning: no previously-included files found matching 'docs/source/generated/*'
warning: no previously-included files matching '*' found under directory 'docs/build'
warning: no previously-included files matching '*' found under directory 'docs/build/htmlhelp'
warning: no files found matching 'statsmodels/statsmodelsdoc.chm'
warning: no files found matching 'statsmodels/sandbox/panel/test_data.txt'
warning: no files found matching 'statsmodels/stats/libqsturng/tests/results/*'
warning: no files found matching 'statsmodels/stats/libqsturng/tests/bootleg.csv'
warning: no previously-included files matching '*~' found anywhere in distribution
warning: no previously-included files matching '*.swp' found anywhere in distribution
warning: no previously-included files matching '*.pyc' found anywhere in distribution
warning: no previously-included files matching '*.bak' found anywhere in distribution
writing manifest file 'statsmodels.egg-info/SOURCES.txt'
installing library code to build/bdist.macosx-10.6-intel/egg
running install_lib
running build_py
copying statsmodels/version.py -> build/lib.macosx-10.6-intel-2.7/statsmodels
error: can't copy 'statsmodels/nonparametric/_smoothers_lowess.c': doesn't exist or not a regular file
@jseabold
Member
jseabold commented Aug 5, 2013

Do you have Cython installed in the virtualenv?

@jseabold
Member
jseabold commented Aug 5, 2013

I'm still not that clear on which version of distribute you have, so I can try to replicate this. That's the only thing that I think it could be unless there's some local issue. The "latest version of distribute" is setuptools. Ie., if you pip install distribute, you get setuptools AFAIK.

I haven't looked that much into this yet, but I know the main reason the latest matplotlib release took so long was dealing with the fact that distribute doesn't exist anymore. I was hoping to avoid similar pain points, though this is (maybe) the only one we've seen so far.

@jseabold
Member
jseabold commented Aug 5, 2013

Though I could very well be wrong about the upstream setuptools/distribute situation. I only followed a bit the matplotlib discussion of it.

@urschrei
urschrei commented Aug 5, 2013

I don't think it's a distribute issue – and the Cython install has fixed my latest error, so the package is installed now. Phew.

@jseabold
Member
jseabold commented Aug 5, 2013

I have no idea what else it could be then since pip works fine on my box. Version number would still be helpful so I can rule this out.

The latest version of distribute is 0.7.3 and it says "This package is a simple compatibility layer that installs Setuptools 0.7+." https://pypi.python.org/pypi/distribute/0.7.3

@urschrei
urschrei commented Aug 5, 2013

pip version is 1.3.1, and distribute is 0.7.3.
It may be that the problem I was referring to was the setuptools issue – I wish I'd taken more notice of the specific explanation behind the distribute install, when I found it last night.

@jseabold
Member
jseabold commented Aug 5, 2013

Hmm, ok, yeah then it's not that. Works fine for me with this version. The only other thing I'd think to try is to do a

pip install -v -v -v statsmodels --log=pip.log

and make sure that the "source" of the installation is truly remote and not local. I've had to delete cached versions from /tmp/pip-build-root/ before Though you already specified the tarball above, so I doubt that's it either.

@josef-pkt
Member

I edited the title.

closing this because it doesn't have an identifiable bug.

reopen if problem shows up again

@josef-pkt josef-pkt closed this Aug 15, 2013
@ghost
ghost commented Sep 3, 2013

I'm currently getting the same bug

Searching for statsmodels
Reading http://pypi.python.org/simple/statsmodels/
Reading http://statsmodels.sourceforge.net/
Reading https://github.com/statsmodels/statsmodels/downloads
Best match: statsmodels 0.5.0
Downloading https://pypi.python.org/packages/source/s/statsmodels/statsmodels-0.5.0.zip#md5=4ed78e8c6ababdcae0400fc0fe6f31a7
Processing statsmodels-0.5.0.zip
Running statsmodels-0.5.0/setup.py -q bdist_egg --dist-dir /tmp/easy_install-Rd6ayl/statsmodels-0.5.0/egg-dist-tmp-8t_Ac2
Traceback (most recent call last):
  File "/usr/bin/easy_install-2.7", line 10, in <module>
    load_entry_point('setuptools==0.6c12dev-r88846', 'console_scripts', 'easy_install')()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 1712, in main
    with_ei_usage(lambda:
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 1700, in with_ei_usage
    return f()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 1716, in <lambda>
    distclass=DistributionWithoutHelpCommands, **kw
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/core.py", line 152, in setup
    dist.run_commands()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 953, in run_commands
    self.run_command(cmd)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/distutils/dist.py", line 972, in run_command
    cmd_obj.run()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 211, in run
    self.easy_install(spec, not self.no_deps)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 446, in easy_install
    return self.install_item(spec, dist.location, tmpdir, deps)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 476, in install_item
    dists = self.install_eggs(spec, download, tmpdir)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 655, in install_eggs
    return self.build_and_install(setup_script, setup_base)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 930, in build_and_install
    self.run_setup(setup_script, setup_base, args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/command/easy_install.py", line 919, in run_setup
    run_setup(setup_script, args)
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 62, in run_setup
    lambda: execfile(
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 105, in run
    return func()
  File "/System/Library/Frameworks/Python.framework/Versions/2.7/Extras/lib/python/setuptools/sandbox.py", line 64, in <lambda>
    {'__file__':setup_script, '__name__':'__main__'}
  File "setup.py", line 472, in <module>
KeyError: 'statsmodels.datasets.tests'
@jseabold
Member
jseabold commented Sep 3, 2013

Can you post system information, what command you ran, etc.? This is hard to debug since we can't replicate.

@jseabold
Member
jseabold commented Sep 3, 2013

Also, can you replicate this locally? I.e., if you download the statsmodels-0.5.0.zip and then run pip install /path/to/zip does it still fail? If so, we can maybe recruit you to do some debugging work for us.

@ghost
ghost commented Sep 3, 2013

Sorry...

I'm on OSX: Darwin bduffield-mbp 12.1.0 Darwin Kernel Version 12.1.0: Tue Aug 14 13:29:55 PDT 2012; root:xnu-2050.9.2~1/RELEASE_X86_64 x86_64

I got the same error using both pip and easy_install
sudo pip install statsmodels
sudo easy_install statsmodels

I was successfully able to install it locally via
sudo easy_install .
so for me this is currently all good :) but figured it could be an issue worth flagging.

@jseabold
Member
jseabold commented Sep 3, 2013

I take it you unzipped it locally first? What about just trying to install the zip file. Would be helpful if you could replicate the failure locally. I'm wondering if the curdir that's in get_data_files is somehow wrong (and why it's only wrong on OSX...). Throwing in a print statement there for root and posting might be insightful.

@ghost
ghost commented Sep 3, 2013

I've uninstalled. Will try doing it locally. Else, where would I add the line? You mean edit setup.py?

@ghost
ghost commented Sep 3, 2013

The same thing happens when doing from zip. Curious as to why it then works when unzipped.

bduffield ~ $ sudo pip install Downloads/statsmodels-0.5.0.zip
Unpacking ./Downloads/statsmodels-0.5.0.zip
  Running setup.py egg_info for package from file:///Users/bduffield/Downloads/statsmodels-0.5.0.zip
    Traceback (most recent call last):
      File "<string>", line 16, in <module>
      File "/tmp/pip-QZ4kvD-build/setup.py", line 472, in <module>
        package_data["statsmodels.datasets.tests"].append("*.zip")
    KeyError: 'statsmodels.datasets.tests'
    Complete output from command python setup.py egg_info:
    Traceback (most recent call last):

  File "<string>", line 16, in <module>

  File "/tmp/pip-QZ4kvD-build/setup.py", line 472, in <module>

    package_data["statsmodels.datasets.tests"].append("*.zip")

KeyError: 'statsmodels.datasets.tests'

----------------------------------------
Command python setup.py egg_info failed with error code 1 in /tmp/pip-QZ4kvD-build
Storing complete log in /Users/bduffield/.pip/pip.log
@jseabold
Member
jseabold commented Sep 3, 2013

Great, thanks. That's good, I guess. Can you edit the setup.py in the zip and add a print root at line 433-434 then try again. Maybe that'll shed some light...?

@ghost
ghost commented Sep 3, 2013

for pip:
ROOT IS: /tmp/pip-gjr9S2-build/statsmodels/datasets

for easy_install:
ROOT IS: /tmp/easy_install-q_lWLu/statsmodels-0.5.0/statsmodels/datasets

@jseabold
Member
jseabold commented Sep 4, 2013

Is that the same tmp directory that's listed in the traceback? I.e.,

File "/tmp/pip-gjr9S2-build/setup.py", line 472, in <module>

What about a print os.listdir(root)? Does that give the contents of the datasets directory? And lastly, what about adding a print data_files after the first loop around line 440-441.

This is very mysterious to me.

@ghost
ghost commented Sep 4, 2013

The return from data_files seems to be a bit broken...

{'............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.randhie': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.sunspots': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.macrodata': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.strikes': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.spector': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.heart': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.robust.tests.results': ['*.csv', '*.txt'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.longley': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.copper': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.nile': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.emplike.tests.results': ['*.csv', '*.txt'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.committee': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.tsa.vector_ar.tests.results': ['*.csv', '*.txt'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.iolib.tests.results': ['*.csv', '*.txt'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.stackloss': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.ccard': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.cpunish': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.engel': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.elnino': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.tsa.tests.results': ['*.csv', '*.txt'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.statecrime': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.nonparametric.tests.results': ['*.csv', '*.txt'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.tests.results': ['*.csv', '*.txt'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.scotland': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.discrete.tests.results': ['*.csv', '*.txt'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.grunfeld': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.regression.tests.results': ['*.csv', '*.txt'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.stats.tests.results': ['*.csv', '*.txt'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.tests': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.genmod.tests.results': ['*.csv', '*.txt'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.cancer': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.star98': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.fair': ['*.csv', '*.dta'], '............tmp.easy_install-3w1cjG.statsmodels-0.5.0.statsmodels.datasets.anes96': ['*.csv', '*.dta']}
@jseabold
Member
jseabold commented Sep 4, 2013

Ah, indeed. Thanks! I'm not yet sure why it's doing this, but at least I know what to look for to fix.

@josef-pkt
Member

I think the problem is in the relpath
The translation from absolute filepath to the path that starts with statsmodels. is incorrect, I think

@ghost
ghost commented Sep 4, 2013

it must be getting something like ../../../.. (and then the later replace all '/' with '.')

@ghost
ghost commented Sep 4, 2013

I also recall I saw something funky on a mac before where if you programatically ask for /tmp you get put in /private/tmp. Not sure if that's at all relevant.

@josef-pkt
Member

maybe instead of relpath(path, start=os.curdir) it should use curdir
relpath(path, start=curdir)

@ghost
ghost commented Sep 4, 2013

All the relpath calls don't take a start=

def get_data_files():
    sep = os.path.sep
    # install the datasets
    data_files = {}
    root = pjoin(curdir, "statsmodels", "datasets")
    print("ROOT IS WHAT?????????????????")
    print("ROOT IS: %s" % root)
    for i in os.listdir(root):
        if i is "tests":
            continue
        path = pjoin(root, i)
        if os.path.isdir(path):
            data_files.update({relpath(path).replace(sep, ".") : ["*.csv",
                                                                  "*.dta"]})
    # add all the tests and results files
    for r, ds, fs in os.walk(pjoin(curdir, "statsmodels")):
        if r.endswith('results') and 'sandbox' not in r:
            data_files.update({relpath(r).replace(sep, ".") : ["*.csv",
                                                               "*.txt"]})

    print("Data files are: %s" % data_files)
    return data_files
@jseabold
Member
jseabold commented Sep 4, 2013

Yeah, I think that should do it. Do you mind trying that? Just make the change to the two relpath's in that function to take start=curdir.

@ghost
ghost commented Sep 4, 2013

WORKED :D

Thanks!

@jseabold
Member
jseabold commented Sep 4, 2013

Awesome. Thanks for the hand.

@ghost
ghost commented Sep 4, 2013
@jseabold
Member
jseabold commented Sep 4, 2013

And a PR! Perfect.

@myisis
myisis commented Jul 8, 2014

I had the same problem (KeyError: 'statsmodels.datasets.tests') and got around it by updating pip (from pip 1.2.1 to pip pip 1.5.6). I never considered upgrading pip, but it turned out solving the problem...

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment