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

Error in reading all wos files in a folder #161

Closed
kevinbsc opened this issue Aug 4, 2016 · 2 comments
Closed

Error in reading all wos files in a folder #161

kevinbsc opened this issue Aug 4, 2016 · 2 comments

Comments

@kevinbsc
Copy link

kevinbsc commented Aug 4, 2016

I am using a template ipython notebook "1. Working with data from the Web of Science".
Several files from Web of Science are located in a folder ("data/ds"). So I write

corpus = wos.read('data/ds/')

This returns an error:

`ValueError Traceback (most recent call last)
in ()
----> 1 corpus = wos.read('data/ds/')

/home/anaconda2/lib/python2.7/site-packages/tethne/readers/wos.pyc in read(path, corpus, index_by, streaming, parse_only, corpus_class, **kwargs)
393 papers += read(os.path.join(path, sname),
394 corpus=False,
--> 395 parse_only=parse_only)
396 else: # A single data file.
397 papers = WoSParser(path).parse(parse_only=parse_only)

/home/anaconda2/lib/python2.7/site-packages/tethne/readers/wos.pyc in read(path, corpus, index_by, streaming, parse_only, corpus_class, **kwargs)
395 parse_only=parse_only)
396 else: # A single data file.
--> 397 papers = WoSParser(path).parse(parse_only=parse_only)
398
399 if corpus:

/home/anaconda2/lib/python2.7/site-packages/tethne/readers/base.pyc in parse(self, parse_only)
123 break
124
--> 125 self.handle(tag, data)
126 self.last_tag = tag
127 return self.data

/home/anaconda2/lib/python2.7/site-packages/tethne/readers/base.pyc in handle(self, tag, data)
164 handler = self._get_handler(tag)
165 if handler is not None:
--> 166 data = handler(data)
167
168 if tag in self.tags: # Rename the field.

/home/anaconda2/lib/python2.7/site-packages/tethne/readers/wos.pyc in handle_PY(self, value)
136 WoS publication years are cast to integers.
137 """
--> 138 return int(value)
139
140 def handle_AU(self, value):

ValueError: invalid literal for int() with base 10: 'Z8 0'`

@kevinbsc kevinbsc closed this as completed Aug 4, 2016
@erickpeirson
Copy link
Collaborator

@kevinbsc Did you figure out what went wrong?

@kevinbsc
Copy link
Author

kevinbsc commented Aug 4, 2016

I figured it out. Thanks for getting back to me.

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