You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running script,. there is indexing error in reading the filename. File "/Users/huarundong/dbs/diffpy.srmise/diffpy.srmise/src/diffpy/srmise/pdfdataset.py", line 407, in <module> filename = sys.argv[1] ~~~~~~~~^^^ IndexError: list index out of range
The text was updated successfully, but these errors were encountered:
This particular test script was intended to run with a command-line argument, a path to a file with a readable PDF. If you just run pdfdataset.py alone then sys.argv[1] does not exist. I'm sure you have access to many of these, but the repository already includes several in doc/examples/data. All the script does is read in the data then prints to the console the file's PDF metadata (e.g. qmax) and 4 columns of data.
As a temporary measure, include a path to such a file if you just want this script to run without error. However, this entire if __name__ == "__main__": block should be removed and replaced with a proper test. The code in this file is taken nearly verbatim from PDFgui (see file header) so you might be able to borrow tests from that project.
When running script,. there is indexing error in reading the filename.
File "/Users/huarundong/dbs/diffpy.srmise/diffpy.srmise/src/diffpy/srmise/pdfdataset.py", line 407, in <module>
filename = sys.argv[1]
~~~~~~~~^^^
IndexError: list index out of range
The text was updated successfully, but these errors were encountered: