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

deprecated os module #5172

Closed
1 task done
arian81 opened this issue Aug 10, 2023 · 2 comments
Closed
1 task done

deprecated os module #5172

arian81 opened this issue Aug 10, 2023 · 2 comments
Labels
bug Something isn't working

Comments

@arian81
Copy link
Contributor

arian81 commented Aug 10, 2023

Describe the bug

In the newest version of gradio I get the following error.

AttributeError: module 'os' has no attribute 'statvfs'

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

start any project on newest gradio version

Screenshot

No response

Logs

Running on local URL:  http://0.0.0.0:7860


Could not create share link. Please check your internet connection or our status page: https://status.gradio.app.
  File "C:\Users\.virtualenvs\pandasai-gradio-9fhMscgt\Lib\site-packages\gradio\blocks.py", line 27, in <module>
    from gradio import (
  File "C:\Users\.virtualenvs\pandasai-gradio-9fhMscgt\Lib\site-packages\gradio\networking.py", line 18, in <module>
    from gradio.routes import App
  File "C:\Users\.virtualenvs\pandasai-gradio-9fhMscgt\Lib\site-packages\gradio\routes.py", line 44, in <module>
    import gradio.ranged_response as ranged_response
  File "C:\Users\.virtualenvs\pandasai-gradio-9fhMscgt\Lib\site-packages\gradio\ranged_response.py", line 12, in <module>
    from aiofiles.os import stat as aio_stat
  File "C:\Users\.virtualenvs\pandasai-gradio-9fhMscgt\Lib\site-packages\aiofiles\os.py", line 32, in <module>
    statvfs = wrap(os.statvfs)
                   ^^^^^^^^^^
AttributeError: module 'os' has no attribute 'statvfs'


### System Info

```shell
Gradio Environment Information:
Operating System:  Windows


gradio version:  3.39.0

gradio Dependencies:
  aiofiles: 23.2.0
  aiohttp: 3.8.5
  altair: 5.0.1
  fastapi: 0.101.0
  ffmpy: 0.3.1
  gradio-client: 0.3.0
  httpx: 0.24.1
  huggingface-hub: 0.16.4
  jinja2: 3.1.2
  markdown-it-py: 2.2.0
  markupsafe: 2.1.3
  matplotlib: 3.7.2
  mdit-py-plugins: 0.3.3
  numpy: 1.25.2
  orjson: 3.9.4
  packaging: 23.1
  pandas: 1.5.3
  pillow: 10.0.0
  pydantic: 2.1.1
  pydub: 0.25.1
  python-multipart: 0.0.6
  pyyaml: 6.0.1
  requests: 2.31.0
  semantic-version: 2.10.0
  typing-extensions: 4.7.1
  uvicorn: 0.23.2
  websockets: 11.0.3


gradio_client version:  0.3.0

gradio_client Dependencies:
  fsspec: 2023.6.0
  httpx: 0.24.1
  huggingface-hub: 0.16.4
  packaging: 23.1
  requests: 2.31.0
  typing-extensions: 4.7.1
  websockets: 11.0.3

Severity

Blocking usage of gradio

@arian81 arian81 added the bug Something isn't working label Aug 10, 2023
@arian81
Copy link
Contributor Author

arian81 commented Aug 10, 2023

The current work around is to comment out "statvfs" components from the os library. Based on my research this function shouldn't even be running on my system since it's only meant for mac os.

@freddyaboulton
Copy link
Collaborator

Hi @arian81 - please reinstall aiofiles. Version 23.2.0 was yanked because it had a bug! https://pypi.org/project/aiofiles/#history

Same bug as #5153 so will close.

Thank you!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants