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

Bin2csv.py issue (how to use properly this scritpt) #2

Open
Fousseno opened this issue Jun 1, 2018 · 11 comments
Open

Bin2csv.py issue (how to use properly this scritpt) #2

Fousseno opened this issue Jun 1, 2018 · 11 comments

Comments

@Fousseno
Copy link

Fousseno commented Jun 1, 2018

Hi

I tried to use the bin2csv.py but I keep getting this error :

print(process_nda(sys.argv[0], sys.argv[2]))
IndexError: list index out of range

Please can you help me to solve it

@thebestpatrick
Copy link
Owner

I believe the issue is you need to tell the script both where the nda file is, and where you want it to output the finished csv to. So the syntax should be something like
python3 bin2csv.py input.nda output.csv

@Fousseno
Copy link
Author

Fousseno commented Jun 3, 2018 via email

@thebestpatrick
Copy link
Owner

When I was working with the script regularly, only nda files which started with the characters NEWARE right at the beginning were appropriate for being processed, and if they lacked that tag it could produce a nonsense csv file or crash the script elsewhere.

If you would like to attempt running the script on your nda file anyway, just comment out lines 126 and 127 in the bin2csv.py script. All that will happen if the file doesn't work with the script is the script will error out or just make a wrong csv, it won't break your nda file or anything.

@Fousseno
Copy link
Author

Fousseno commented Jun 3, 2018 via email

@thebestpatrick
Copy link
Owner

Did it produce a csv file despite that? The only case I can see in the code where csv_line gets referenced before it could be assigned is if it could find no valid data within the nda file.

@Fousseno
Copy link
Author

Fousseno commented Jun 3, 2018 via email

@thebestpatrick
Copy link
Owner

Let me know if things work out, unfortunately my ability to actually troubleshoot is going to be extremely limited because I no longer have access to nda data files for testing, but I will help if I can. This was a script used at a previous job.

@Fousseno
Copy link
Author

Fousseno commented Jun 3, 2018 via email

@thebestpatrick
Copy link
Owner

I don't see a file attached there, you could try uploading it to your github account and linking me to it. I'll take a look.

@Fousseno
Copy link
Author

Fousseno commented Jun 3, 2018

New Compressed (zipped) Folder.zip

let me know if you can see it now

@thebestpatrick
Copy link
Owner

Yes

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