Skip to content

create_a_venv Fails If venv_path is a string #7

Description

@EricLYunqi

File src/bolo/api.py, line 85 - 94:

    def create_venv(self, repo_id: str, venv_path: str | Path | None = None):
        repo_name = "__SEP__".join(repo_id.split('/'))
        
        if not venv_path:
            venv_path = self.db_dir / "tmp_venv" / repo_name
            print(f"you do not specify the venv path for {repo_id}, we create by default at {venv_path}")
        
        if venv_path.exists():
            print(f"ven for {repo_id} has been already existed")
            return venv_path / "bin" / "python", True

...

Obviously if the venv_path it will throw an run time error since str object does not have exists() function

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Fields

    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions