gslab-econ / gslab_python

Python tools for GSLab
MIT License
13 stars 11 forks source link

Error parsing gslab_tools version #164

Closed jmshapir closed 5 years ago

jmshapir commented 5 years ago

Using gslab_tools v. 4.1.2 My config_global calls for at least v. 4.1.1 I get the error below Any thoughts?


C:\Users\jshapir1\Documents\GitHub\Skills\paper_slides>python run.py
scons: Reading SConscript files ...
TypeError: sequence item 0: expected string, int found:
  File "C:\Users\jshapir1\Documents\GitHub\Skills\paper_slides\SConstruct", line
 12:
    [mode, cache_dir, CONFIG, executable_names, prereqs, pythonpath] = configura
tion(ARGUMENTS)
  File "../config\configuration.py", line 55:
    gslab_vers = CONFIG['global']['gslab_version'])
  File "C:\python27\lib\site-packages\gslab_scons\check_prereq.py", line 33:
    % ('.'.join(installed_version), '.'.join(required_version))
Shun-Yang commented 5 years ago

@jmshapir Do you mind changing 4.1.1 to 4.1.2 in config_global.yaml?

I can reproduce this bug by changing my version number in config_global from 4.1.2 to 4.1.1. I'm not sure if this error is intentional, but the error message is definitely confusing. I'll take a look at what's happening.

jmshapir commented 5 years ago

@Shun-Yang yup, that change kills this error.

DavidRitzwoller commented 5 years ago

@jmshapir @Shun-Yang I found the bug causing the error. There was an issue with how we were parsing the version number for our package.

Before After
screen shot 2018-10-16 at 10 47 13 pm screen shot 2018-10-16 at 10 47 28 pm

There is now an informative error message when using an outdated version of gslab_python.

screen shot 2018-10-16 at 10 44 38 pm
DavidRitzwoller commented 5 years ago

Summary: In this issue, we fixed an error in how the version number of gslab_python is being read.

PR at #165