Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

nbconvert: commandline tests fail Win7x64 Py3.3 #3945

Closed
jdfreder opened this issue Aug 7, 2013 · 9 comments · Fixed by #3974
Closed

nbconvert: commandline tests fail Win7x64 Py3.3 #3945

jdfreder opened this issue Aug 7, 2013 · 9 comments · Fixed by #3974
Milestone

Comments

@jdfreder
Copy link
Member

jdfreder commented Aug 7, 2013

nbconvert: commandline tests fail Win7x64 Py3.3

Even though this is deep in my territory, pinging @ivanov for input before I get
started since this has to do with the traitlet lists via commandline.

**********************************************************************
IPython test group: IPython.nbconvert
........................................................EEEEE..SE

======================================================================
ERROR: Do explicit notebook names work?
----------------------------------------------------------------------
Traceback (most recent call last):
  File "E:\Python33\lib\site-packages\ipython-1.0.0_dev-py3.3.egg\IPython\nbconv
ert\tests\test_nbconvertapp.py", line 71, in test_explicit
    self.call('nbconvert --log-level=0 --to="python" --notebooks='
  File "E:\Python33\lib\site-packages\ipython-1.0.0_dev-py3.3.egg\IPython\nbconv
ert\tests\base.py", line 142, in call
    raise OSError(stderr)
OSError: [NbConvertApp] CRITICAL | Bad config encountered during initialization:

[NbConvertApp] CRITICAL | The 'notebooks' trait of a NbConvertApp instance must
be a list or None, but a value of class 'str' (i.e. '[notebook2.ipynb]') was spe
cified.


======================================================================
ERROR: Can explicit notebook names be used and then a matching search pattern?
----------------------------------------------------------------------
Traceback (most recent call last):
  File "E:\Python33\lib\site-packages\ipython-1.0.0_dev-py3.3.egg\IPython\nbconv
ert\tests\test_nbconvertapp.py", line 119, in test_explicit_glob
    self.call('nbconvert --log-level=0 --to="python" --notebooks='
  File "E:\Python33\lib\site-packages\ipython-1.0.0_dev-py3.3.egg\IPython\nbconv
ert\tests\base.py", line 142, in call
    raise OSError(stderr)
OSError: [NbConvertApp] CRITICAL | Bad config encountered during initialization:

[NbConvertApp] CRITICAL | The 'notebooks' trait of a NbConvertApp instance must
be a list or None, but a value of class 'str' (i.e. '[notebook1.ipynb,notebook2.
ipynb,*.ipynb]') was specified.


======================================================================
ERROR: Do search patterns work for notebook names?
----------------------------------------------------------------------
Traceback (most recent call last):
  File "E:\Python33\lib\site-packages\ipython-1.0.0_dev-py3.3.egg\IPython\nbconv
ert\tests\test_nbconvertapp.py", line 49, in test_glob
    self.call('nbconvert --to="python" --notebooks=\'["*.ipynb"]\' --log-level=0
')
  File "E:\Python33\lib\site-packages\ipython-1.0.0_dev-py3.3.egg\IPython\nbconv
ert\tests\base.py", line 142, in call
    raise OSError(stderr)
OSError: [NbConvertApp] CRITICAL | Bad config encountered during initialization:

[NbConvertApp] CRITICAL | The 'notebooks' trait of a NbConvertApp instance must
be a list or None, but a value of class 'str' (i.e. '[*.ipynb]') was specified.


======================================================================
ERROR: Can a search pattern be used along with matching explicit notebook names?

----------------------------------------------------------------------
Traceback (most recent call last):
  File "E:\Python33\lib\site-packages\ipython-1.0.0_dev-py3.3.egg\IPython\nbconv
ert\tests\test_nbconvertapp.py", line 108, in test_glob_explicit
    self.call('nbconvert --log-level=0 --to="python" --notebooks='
  File "E:\Python33\lib\site-packages\ipython-1.0.0_dev-py3.3.egg\IPython\nbconv
ert\tests\base.py", line 142, in call
    raise OSError(stderr)
OSError: [NbConvertApp] CRITICAL | Bad config encountered during initialization:

[NbConvertApp] CRITICAL | The 'notebooks' trait of a NbConvertApp instance must
be a list or None, but a value of class 'str' (i.e. '[*.ipynb,notebook1.ipynb,no
tebook2.ipynb]') was specified.


======================================================================
ERROR: Do search patterns work for subdirectory notebook names?
----------------------------------------------------------------------
Traceback (most recent call last):
  File "E:\Python33\lib\site-packages\ipython-1.0.0_dev-py3.3.egg\IPython\nbconv
ert\tests\test_nbconvertapp.py", line 61, in test_glob_subdir
    '\'["%s"]\'' % os.path.join('subdir', '*.ipynb'))
  File "E:\Python33\lib\site-packages\ipython-1.0.0_dev-py3.3.egg\IPython\nbconv
ert\tests\base.py", line 142, in call
    raise OSError(stderr)
OSError: [NbConvertApp] CRITICAL | Bad config encountered during initialization:

[NbConvertApp] CRITICAL | The 'notebooks' trait of a NbConvertApp instance must
be a list or None, but a value of class 'str' (i.e. '[subdir\\*.ipynb]') was spe
cified.


======================================================================
ERROR: Do export templates work?
----------------------------------------------------------------------
Traceback (most recent call last):
  File "E:\Python33\lib\site-packages\ipython-1.0.0_dev-py3.3.egg\IPython\nbconv
ert\tests\test_nbconvertapp.py", line 96, in test_template
    self.call('nbconvert --log-level=0 --to=slides --notebooks='
  File "E:\Python33\lib\site-packages\ipython-1.0.0_dev-py3.3.egg\IPython\nbconv
ert\tests\base.py", line 142, in call
    raise OSError(stderr)
OSError: [NbConvertApp] CRITICAL | Bad config encountered during initialization:

[NbConvertApp] CRITICAL | The 'notebooks' trait of a NbConvertApp instance must
be a list or None, but a value of class 'str' (i.e. '[notebook2.ipynb]') was spe
cified.


----------------------------------------------------------------------
Ran 65 tests in 8.289s

FAILED (SKIP=1, errors=6)
@jdfreder
Copy link
Member Author

jdfreder commented Aug 7, 2013

It seems like the input should be evaluated through the py interpreter, but it's not. Why this fails on Windows and not *nix, I have no idea.

@jdfreder
Copy link
Member Author

jdfreder commented Aug 7, 2013

BTW: I do have pywin32 installed

@ivanov
Copy link
Member

ivanov commented Aug 8, 2013

hmm, works here on python3... let's just try a simple way of passing a Configurabe list from the command line to python3:

make a new file called testext.py with these contents:

def load_ipython_extension(ip):
    print('X'*80)
    print("omg, extension loaded!")
    print('X'*80)

and then run ipython3 --InteractiveShellApp.extensions='["testext"]' (note that, yes, there are two different types of quoting going on there).

report back here with the results, or try to fiddle with it and massage it until it accepts that list from the command line

@ivanov
Copy link
Member

ivanov commented Aug 8, 2013

quick thought - if the extension example works, it could be that you need to insert extra escapes for the path separators on windows....

@jdfreder
Copy link
Member Author

jdfreder commented Aug 9, 2013

WEIRD, so
ipython3 --InteractiveShellApp.extensions='["testext"]' does not work
ipython3 --InteractiveShellApp.extensions="['testext']" does
ipython3 --InteractiveShellApp.extensions=['testext'] does

@jdfreder
Copy link
Member Author

jdfreder commented Aug 9, 2013

This is what is used in nbconvert's tests

--notebooks='["notebook1.ipynb","notebook2.ipynb","*.ipynb"]'

I'll open a PR that changes it... We will let Travis test on *nix

@Carreau
Copy link
Member

Carreau commented Aug 9, 2013

@ivanov also want to modify the parser to ba able to do

--notebooks=aaa,bbb,ccc,ddd

might not work with glob tough.

@ivanov
Copy link
Member

ivanov commented Aug 9, 2013

Matthias Bussonnier, on 2013-08-09 12:07, wrote:

@ivanov also want to modify the parser to ba able to do

--notebooks=aaa,bbb,ccc,ddd

#3847 is the enhancement filed for that, Matthias

@Carreau
Copy link
Member

Carreau commented Aug 9, 2013

#3847 is the enhancement filed for that, Matthias

Right, thanks. Will it break master ?

minrk added a commit that referenced this issue Aug 16, 2013
closes #3945

Please see issue for more information.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants