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

hub自动解压会报错? #2325

Open
allenxln opened this issue May 11, 2024 · 1 comment
Open

hub自动解压会报错? #2325

allenxln opened this issue May 11, 2024 · 1 comment
Assignees

Comments

@allenxln
Copy link

欢迎您反馈PaddleHub使用问题,非常感谢您对PaddleHub的贡献!
在留下您的问题时,辛苦您同步提供如下信息:

  • 版本、环境信息
    1)PaddleHub和PaddlePaddle版本:请提供您的PaddleHub和PaddlePaddle版本号,例如PaddleHub1.4.1,PaddlePaddle1.6.2
    2)系统环境:ubuntu, python=3.8.1
  • conda 创建 python=3.8.1的版本,
  • 然后activate,然后 按照官网的 pip install paddlepaddle = xxx --channel = xxxx,
  • 然后 pip install paddlehub
  • 然后再跑 这个示例代码:
    import paddlehub as hub

lac = hub.Module(name="lac")
test_text = ["今天是个好天气。"]

results = lac.cut(text=test_text, use_gpu=False, batch_size=1, return_tag=True)
print(results)
#{'word': ['今天', '是', '个', '好天气', '。'], 'tag': ['TIME', 'v', 'q', 'n', 'w']}

然后就报错了。:
不知道源码是free了啥东西?

TIPS:我手动解压到 ~/.paddlehub/modules ,然后再跑就没报错了。是自动解压出了啥问题吗?

/home/ubuntu/miniconda3/envs/paddle_env/lib/python3.8/site-packages/_distutils_hack/init.py:26: UserWarning: Setuptools is replacing distutils.
warnings.warn("Setuptools is replacing distutils.")
Download https://bj.bcebos.com/paddlehub/paddlehub_dev/lac_2.4.0.zip
[##################################################] 100.00%
Decompress /home/ubuntu/.paddlehub/tmp/tmpb9b049u1/lac_2.4.0.zip
free(): invalid pointer
Aborted (core dumped)
(paddle_env) (base) ubuntu@VM-12-2-ubuntu:~/.paddlehub$

@w5688414
Copy link

我测了一下没什么问题,可能跟网络环境有关:

image

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

2 participants