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

Pin aiofiles version? #5153

Closed
1 task done
catboxanon opened this issue Aug 9, 2023 · 1 comment
Closed
1 task done

Pin aiofiles version? #5153

catboxanon opened this issue Aug 9, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@catboxanon
Copy link

catboxanon commented Aug 9, 2023

Describe the bug

Edit: This was fixed upstream pretty fast but I still am going to propose the question here.

This is moreso a question. A recent aiofiles update broke compatibility with Windows systems.

Tinche/aiofiles#162
Tinche/aiofiles#171
Tinche/aiofiles#172

Currently the version Gradio specifies for this is pretty lenient which allowed this to seep thru.

aiofiles>=22.0,<24.0

Should this be considered to be a more strict version pin to prevent any similar issues occurring in the future?

Have you searched existing issues? 🔎

  • I have searched and found no existing issues

Reproduction

Create a fresh Python venv and install Gradio, and run any demo from https://www.gradio.app/demos. Instead a traceback will be returned with AttributeError: module 'os' has no attribute 'statvfs'.

Screenshot

No response

Logs

Traceback (most recent call last):
  File "H:\Projects\Programming\_new\gradiotest\main.py", line 1, in <module>
    import gradio as gr
  File "H:\Projects\Programming\_new\gradiotest\venv\lib\site-packages\gradio\__init__.py", line 3, in <module>
    import gradio.components as components
  File "H:\Projects\Programming\_new\gradiotest\venv\lib\site-packages\gradio\components\__init__.py", line 1, in <module>
    from gradio.components.annotated_image import AnnotatedImage
  File "H:\Projects\Programming\_new\gradiotest\venv\lib\site-packages\gradio\components\annotated_image.py", line 13, in <module>
    from gradio.components.base import IOComponent, _Keywords
  File "H:\Projects\Programming\_new\gradiotest\venv\lib\site-packages\gradio\components\base.py", line 29, in <module>
    from gradio.blocks import Block, BlockContext
  File "H:\Projects\Programming\_new\gradiotest\venv\lib\site-packages\gradio\blocks.py", line 27, in <module>
    from gradio import (
  File "H:\Projects\Programming\_new\gradiotest\venv\lib\site-packages\gradio\networking.py", line 18, in <module>
    from gradio.routes import App
  File "H:\Projects\Programming\_new\gradiotest\venv\lib\site-packages\gradio\routes.py", line 44, in <module>
    import gradio.ranged_response as ranged_response
  File "H:\Projects\Programming\_new\gradiotest\venv\lib\site-packages\gradio\ranged_response.py", line 12, in <module>
    from aiofiles.os import stat as aio_stat
  File "H:\Projects\Programming\_new\gradiotest\venv\lib\site-packages\aiofiles\os.py", line 32, in <module>
    statvfs = wrap(os.statvfs)
AttributeError: module 'os' has no attribute 'statvfs'

System Info

# (can't even run this as the same crash occurs; running on Windows 11)

Severity

I can work around it

@abidlabs
Copy link
Member

abidlabs commented Aug 9, 2023

Not needed, as the broken version of aiofiles was yanked:

image

We generally avoid pinning dependencies to anything more specific than a major as that can cause issues if gradio is installed alongside other packages.

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