diging / tethne

Python module for bibliographic network analysis.
http://diging.github.io/tethne/
GNU General Public License v3.0
81 stars 32 forks source link

Missing Modules #121

Closed Mutluk closed 8 years ago

Mutluk commented 8 years ago

Hello Eric,

I am new in Python and i am trying to analyse WOS data. I am using Python 2.7.10 and tethne-0.7.22 is already installed. However, I can not find all the modules (eg. there is not "readers.wos.parse", instead there is only "readers.wos" , and many more modules are missing). I thought this happened because of the version and tried to install tethne-0.7.25 from "https://pypi.python.org/pypi/tethne". Then, I wrote "pip install tethne==0.7.25" to the terminal and got this error:

OSError: [Errno 13] Permission denied: '/Applications/anaconda/lib/python2.7/site-packages/tethne-0.7.22-py2.7.egg-info/dependency_links.txt'

Could you please help me? Do you think I will get all the modules if I upgrade the version (if yes, then how will I upgrade it?). Or is this happening because of the Python version?

Thanks in advance Mutlu

erickpeirson commented 8 years ago

Hi Mutlu,

To start, uninstall and reinstall tethne; there is a new version out this morning.

pip uninstall tethne pip install tethne

If you get the permission error again, you may have to do this as root (prepend "sudo" to the commands above).

As for the missing modules, can you post your code? Particularly your import statements.

The documentation is a bit behind, and the API changed quite a bit between 0.6 and 0.7. For wos, you might try:

from tethne.readers import wos corpus = wos.read("/path/to/data")


Erick Peirson Postdoctoral Scholar ASU-SFI Center for Biosocial Complexity Arizona State University

On Nov 22, 2015, at 8:36 AM, Mutluk notifications@github.com wrote:

Hello Eric,

I am new in Python and i am trying to analyse WOS data. I am using Python 2.7.10 and tethne-0.7.22 is already installed. However, I can not find all the modules (eg. there is not "readers.wos.parse", instead there is only "readers.wos" , and many more modules are missing). I thought this happened because of the version and tried to install tethne-0.7.25 from "https://pypi.python.org/pypi/tethne". Then, I wrote "pip install tethne==0.7.25" to the terminal and got this error:

OSError: [Errno 13] Permission denied: '/Applications/anaconda/lib/python2.7/site-packages/tethne-0.7.22-py2.7.egg-info/dependency_links.txt'

Could you please help me? Do you think I will get all the modules if I upgrade the version (if yes, then how will I upgrade it?). Or is this happening because of the Python version?

Thanks in advance Mutlu

— Reply to this email directly or view it on GitHub.

Mutluk commented 8 years ago

Hi Eric,

Thank you very much for your quick response. I could install the 0.7.25 version. I still don't have the same modules.

Simply,

import tethne.readers as rd from tethne.readers import wos papers = rd.wos.read("/path/to/Article_50.txt") papers[0]

This works: <tethne.classes.paper.Paper at 0x110a6a610>

However, the below one: wos_list = rd.wos.parse("/path/to/Article_50.txt") wos_list[0].keys()

gets this error: 'module' object has no attribute 'parse'

and I can not see most of other modules.

erickpeirson commented 8 years ago

Gotcha. Yes, many extraneous functions were removed in 0.7. parse() was removed, and now read() performs parsing and generates a Corpus instance.

We're working hard on updating the documentation. Are there any other functions that you were hoping to use that are missing?

erickpeirson commented 8 years ago

Oh, and if you have ipython installed, you might find these useful: http://github.com/diging/tethne-notebooks