All-Hands-AI / OpenHands

🙌 OpenHands: Code Less, Make More
https://all-hands.dev
MIT License
37.19k stars 4.22k forks source link

[Bug]: `github.py` should not be named github, circular import issue #5168

Open diwu-sf opened 1 day ago

diwu-sf commented 1 day ago

Is there an existing issue for the same bug?

Describe the bug and reproduction steps

Try running: python openhands/server/listen.py and you will get this error

ERROR:root:  File "/home/ubuntu/openhands/openhands/server/listen.py", line 23, in <module>
    from openhands.server.github import (
  File "/home/ubuntu/openhands/openhands/server/github.py", line 3, in <module>
    from github import Github
  File "/home/ubuntu/openhands/openhands/server/github.py", line 3, in <module>
    from github import Github

ERROR:root:<class 'ImportError'>: cannot import name 'Github' from partially initialized module 'github' (most likely due to a circular import) (/home/ubuntu/openhands/openhands/server/github.py)

I fixed this by renaming github.py to github_utils.py

OpenHands Installation

Docker command in README

OpenHands Version

No response

Operating System

None

Logs, Errors, Screenshots, and Additional Context

No response

mamoodi commented 21 hours ago

Hi there! Are you able to open a PR with your change and get some 👀 on it please? If you ran into it, it's likely others will too..

diwu-sf commented 18 hours ago

Okay will do

On Thu, Nov 21, 2024 at 6:21 AM mamoodi @.***> wrote:

Hi there! Are you able to open a PR with your change and get some 👀 on it please? If you ran into it, it's likely others will too..

— Reply to this email directly, view it on GitHub https://github.com/All-Hands-AI/OpenHands/issues/5168#issuecomment-2491343941, or unsubscribe https://github.com/notifications/unsubscribe-auth/BL3P7PWNLFYRGDOSIJKNKRT2BXT5FAVCNFSM6AAAAABSGHRWXKVHI2DSMVQWIX3LMV43OSLTON2WKQ3PNVWWK3TUHMZDIOJRGM2DGOJUGE . You are receiving this because you authored the thread.Message ID: @.***>