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

Example use bugs #8

Closed
drphilmarshall opened this issue Feb 15, 2017 · 2 comments
Closed

Example use bugs #8

drphilmarshall opened this issue Feb 15, 2017 · 2 comments

Comments

@drphilmarshall
Copy link

drphilmarshall commented Feb 15, 2017

Hi @kadrlica - having some problems trying out mkauthlist here:

pjm@PPA-PC92478 > mkauthlist -f --doc -j emulateapj --sort example_author_list.csv example_author_list.tex
sh: sysctl: command not found
Traceback (most recent call last):
  File "/Users/pjm/miniconda2/bin/mkauthlist", line 351, in <module>
    readlines = open(args.infile).readlines()
IOError: [Errno 2] No such file or directory: 'example_author_list.csv'

The example csv file seems to be in the source repo - but if I pip install it, that example is hidden from me. I think an "--example" or "--test" option that goes and gets the example file would be useful.

Any idea why sysctl is not being found?

I downloaded the example by hand:

pjm@PPA-PC92478 > wget https://github.com/DarkEnergySurvey/mkauthlist/blob/master/data/example_author_list.csv
--2017-02-15 14:39:38--  https://github.com/DarkEnergySurvey/mkauthlist/blob/master/data/example_author_list.csv
Resolving github.com... 192.30.253.113, 192.30.253.112
Connecting to github.com|192.30.253.113|:443... connected.
HTTP request sent, awaiting response... 200 OK
Length: unspecified [text/html]
Saving to: 'example_author_list.csv'

example_author_list     [ <=>                ]  60.78K  --.-KB/s    in 0.1s    

2017-02-15 14:39:38 (424 KB/s) - 'example_author_list.csv' saved [62237]

and then re-ran:

pjm@PPA-PC92478 > mkauthlist -f --doc -j emulateapj --sort example_author_list.csv example_author_list.tex
sh: sysctl: command not found
Traceback (most recent call last):
  File "/Users/pjm/miniconda2/bin/mkauthlist", line 356, in <module>
    rows = [r for r in csv.reader(lines,skipinitialspace=True) if not r[0].startswith('#')]
IndexError: list index out of range

Dude! :-)

@kadrlica
Copy link
Member

That looks like something buried deep inside the standard python csv module. I've never seen that problem on any of the machines I've used mkauthlist on. To confirm that this is a problem with your sysctl/csv install, try just:

import csv
csv.reader(open('filename.csv').readlines(),skipinitialspace=True)

You might try reinstalling csv and/or sysctl

@drphilmarshall
Copy link
Author

This went away when I ran using my better python distribution... Closing! Thanks for the voice of reason :-)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants