Advertisement
Guest User

Untitled

a guest
Mar 19th, 2019
66
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.76 KB | None | 0 0
  1. from zipfile import ZipFile
  2. from scipy.io.arff import loadarff
  3.  
  4. archive = ZipFile( 'archive.zip', 'r' )
  5. datafile = archive.open( 'datafile.arff' )
  6. data = loadarff( datafile )
  7. # …
  8. datafile.close()
  9. archive.close()
  10.  
  11. Traceback (most recent call last):
  12. File "./m.py", line 6, in <module>
  13. data = loadarff( datafile )
  14. File "/usr/lib64/python3.6/site-packages/scipy/io/arff/arffread.py", line 541, in loadarff
  15. return _loadarff(ofile)
  16. File "/usr/lib64/python3.6/site-packages/scipy/io/arff/arffread.py", line 550, in _loadarff
  17. rel, attr = read_header(ofile)
  18. File "/usr/lib64/python3.6/site-packages/scipy/io/arff/arffread.py", line 323, in read_header
  19. while r_comment.match(i):
  20. TypeError: cannot use a string pattern on a bytes-like object
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement