petermr / openDiagram

Extaction of semantic data from diagrams in scientific and other technical/business documents
Apache License 2.0
1 stars 5 forks source link

#unable to run 'search_lib.py' file #2

Open Kanishkaparashar03 opened 3 years ago

Kanishkaparashar03 commented 3 years ago
C:\Users\HP PC\anaconda3\python.exe" "C:/Users/HP PC/openDiagram/physchem/python/search_lib.py"
[nltk_data] Downloading package stopwords to C:\Users\HP
[nltk_data]     PC\AppData\Roaming\nltk_data...
[nltk_data]   Package stopwords is already up-to-date!
Traceback (most recent call last):
  File "C:/Users/HP PC/openDiagram/physchem/python/search_lib.py", line 11, in <module>
    HOME = os.path.expanduser("~")
NameError: name 'os' is not defined

Process finished with exit code 1
petermr commented 3 years ago

os is a very basic Python library. Suggest you see if os works in your REPL.

python
Python 3.8.3 (default, Jul  2 2020, 11:26:31) 
[Clang 10.0.0 ] :: Anaconda, Inc. on darwin
Type "help", "copyright", "credits" or "license" for more information.
>>> import os
>>> 
>>> print( os.path.expanduser("~"))
/Users/pm286