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

在Linux终端执行hub,返回错误OSError: [Errno 9] Bad file descriptor #637

Open
dpln2020 opened this issue May 28, 2020 · 5 comments
Assignees

Comments

@dpln2020
Copy link

1)PaddleHub和PaddlePaddle版本:PaddleHub1.7.0,PaddlePaddle1.8.1
2)系统环境:Linux系统,python3.7
image

在终端输入hub,返回以下内容
Traceback (most recent call last):
File "/usr/local/bin/hub", line 5, in
from paddlehub.commands.hub import main
File "/usr/local/lib/python3.7/site-packages/paddlehub/commands/init.py", line 26, in
from . import config
File "/usr/local/lib/python3.7/site-packages/paddlehub/commands/config.py", line 30, in
HubServer()
File "/usr/local/lib/python3.7/site-packages/paddlehub/common/decorator_utils.py", line 24, in synced_func
return func(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/paddlehub/common/decorator_utils.py", line 35, in _get_instance
_instance[cls] = cls(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/paddlehub/common/hub_server.py", line 60, in init
lock.flock(fp_lock, lock.LOCK_EX)
File "/usr/local/lib/python3.7/site-packages/paddlehub/common/lock.py", line 38, in flock
self.lock.flock(fp, cmd)
OSError: [Errno 9] Bad file descriptor

@ShenYuhan
Copy link
Contributor

您好,您是联网环境吗。如果是的话先在命令行执行一次

hub clear

然后执行

hub search lac

看下是否报错

@dpln2020
Copy link
Author

您好,您是联网环境吗。如果是的话先在命令行执行一次

hub clear

然后执行

hub search lac

看下是否报错

是的,是在联网环境下。执行hub clear时仍然报错,错误内容与图片相同。我尝试着卸载重装了一下,还是这个问题。

@ShenYuhan
Copy link
Contributor

您看下 ~/.paddlehub/conf下面是否有一个json文件,其中是否有内容

@dpln2020
Copy link
Author

~/.paddlehub/conf
麻烦您了,谢谢!json文件内容如下:
{"server_url": ["http://paddlepaddle.org.cn/paddlehub"], "resource_storage_server_url": "https://bj.bcebos.com/paddlehub-data/", "debug": false, "log_level": "DEBUG", "hub_name": "e374c71ceb362529d690793f01cdf43f-1590567561"}

@KevinNuNu
Copy link

您看下 ~/.paddlehub/conf下面是否有一个json文件,其中是否有内容

请问下存在这个config.json文件,并且有内容,然后呢?我现在不是联网环境

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

3 participants