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

import opennre 出错 #217

Closed
suifeng321 opened this issue Dec 16, 2019 · 10 comments
Closed

import opennre 出错 #217

suifeng321 opened this issue Dec 16, 2019 · 10 comments

Comments

@suifeng321
Copy link

安装后import opennre 出错:TypeError: expected str, bytes or os.PathLike object, not NoneType,请问有遇到同样问题的吗?

@gaotianyu1350
Copy link
Collaborator

Please provide more details (e.g., system version, detailed error message)

@suifeng321
Copy link
Author

import opennre
Traceback (most recent call last):
File "", line 1, in
File "", line 961, in _find_and_load
File "", line 950, in _find_and_load_unlocked
File "", line 646, in _load_unlocked
File "", line 616, in load_backward_compatible
File "G:\ProgramData\Anaconda3\lib\site-packages\opennre-0.1-py3.6.egg\opennre
_init
.py", line 5, in
File "", line 961, in _find_and_load
File "", line 950, in _find_and_load_unlocked
File "", line 646, in _load_unlocked
File "", line 616, in _load_backward_compatible
File "G:\ProgramData\Anaconda3\lib\site-packages\opennre-0.1-py3.6.egg\opennre
\pretrain.py", line 10, in
File "G:\ProgramData\Anaconda3\lib\ntpath.py", line 75, in join
path = os.fspath(path)
TypeError: expected str, bytes or os.PathLike object, not NoneType

@wshzd
Copy link

wshzd commented Dec 17, 2019

Just now, l also meet the same error when import opennre. My platform is windows10,my package is as follows:
Package Version


boto3 1.10.2
botocore 1.13.34
certifi 2019.9.11
chardet 3.0.4
Click 7.0
docutils 0.15.2
idna 2.8
jmespath 0.9.4
joblib 0.14.0
nltk 3.4.5
numpy 1.17.4
opennre 0.1
Pillow 6.2.1
pip 19.3.1
python-dateutil 2.8.0
regex 2019.8.19
requests 2.22.0
s3transfer 0.2.1
sacremoses 0.0.35
scikit-learn 0.21.3
scipy 1.3.3
sentencepiece 0.1.83
setuptools 42.0.2
six 1.13.0
sklearn 0.0
torch 1.3.1+cpu
torchvision 0.4.2+cpu
tqdm 4.40.1
transformers 2.1.1
urllib3 1.25.7
wheel 0.33.6

@gaotianyu1350
Copy link
Collaborator

Sorry that for now we only support the Linux platform. Maybe you can try to use the ubuntu command line in Windows 10, or you can change the path format (the error is mainly due to the different formats of path between Linux and windows).

@wshzd
Copy link

wshzd commented Dec 17, 2019

yes, you are right.import opennre is ok on ubuntu platform,thank you.@gaotianyu1350

@GLZ1925
Copy link

GLZ1925 commented Feb 29, 2020

修改opennre下的pretrain.py line11 改为default_root_path = os.path.join(os.getcwd(), '.opennre'),windows下没有HOME环境变量,然后wget的部分改成window右斜杠的目录命名方法,并下载window下的wget.exe并设置环境变量,既可以在windows下运行easy start

@DatAIntellinalytics
Copy link

Change C:\Users......\OpenNRE\opennre -> pretrain.py line no 11 as below.
default_root_path = os.path.join(os.getcwd(), '.opennre')

@thsno02
Copy link

thsno02 commented Apr 14, 2022

修改opennre下的pretrain.py line11 改为default_root_path = os.path.join(os.getcwd(), '.opennre'),windows下没有HOME环境变量,然后wget的部分改成window右斜杠的目录命名方法,并下载window下的wget.exe并设置环境变量,既可以在windows下运行easy start

it works on macOS too

@GLZ1925
Copy link

GLZ1925 commented Apr 14, 2022 via email

@leslie991123
Copy link

修改opennre下的 pretrain.py line11 改为default_root_path = os.path.join(os.getcwd(), '.opennre'),windows下没有HOME环境变量,然后wget的部分改成window右斜杠的目录命名方法,并下载window下的wget.exe并设置环境变量,既可以在windows下运行easy start

请问如何下载window下的wget.exe并设置环境变量呢,有没有大哥具体说一下

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

7 participants