chbrown / liwc-python

Linguistic Inquiry and Word Count (LIWC) analyzer
MIT License
193 stars 50 forks source link

AttributeError: 'module' object has no attribute 'load_token_parser' #2

Closed FMCumhaill closed 6 years ago

FMCumhaill commented 6 years ago

Error as above,

Do you need to make any changes to the liwc.py file?

Traceback:

runfile('C:/Users/Fionn Delahunty/Documents/Insight/LIWC2/test.py', wdir='C:/Users/Fionn Delahunty/Documents/Insight/LIWC2')
Reloaded modules: liwc
C:\Users\Fionn Delahunty\Documents\Insight\LIWC2
Traceback (most recent call last):

  File "<ipython-input-25-b6aa52208070>", line 1, in <module>
    runfile('C:/Users/Fionn Delahunty/Documents/Insight/LIWC2/test.py', wdir='C:/Users/Fionn Delahunty/Documents/Insight/LIWC2')

  File "C:\Users\Fionn Delahunty\Anaconda3\envs\python2\lib\site-packages\spyder\utils\site\sitecustomize.py", line 705, in runfile
    execfile(filename, namespace)

  File "C:\Users\Fionn Delahunty\Anaconda3\envs\python2\lib\site-packages\spyder\utils\site\sitecustomize.py", line 87, in execfile
    exec(compile(scripttext, filename, 'exec'), glob, loc)

  File "C:/Users/Fionn Delahunty/Documents/Insight/LIWC2/test.py", line 29, in <module>
    parse, category_names = liwc.load_token_parser('LIWC2007_English080730_Edit.dic')
chbrown commented 6 years ago

It looks like you're doing something weird with site-packages via sitecustomize.py and reloading?

Python site / module-loading is complicated. I.e., I can't diagnose from that snippet.

chbrown commented 6 years ago

Closing due to underspecified problem and no follow-up.