Skip to content

AttributeError: module 'cosette' has no attribute 'contents' with cosette 0.2.0 #53

@plattenschieber

Description

@plattenschieber

Bug Report

Environment

  • shell-sage version: 0.1.0
  • cosette version: 0.2.0 (installed by default)
  • Python version: 3.10

Problem

When running ssage after installation, it fails with:

AttributeError: module 'cosette' has no attribute 'contents'

Root Cause

Line 252 in shell_sage/core.py tries to access cos.contents:

conts = {'anthropic': cla.contents, 'openai': cos.contents}

However, cosette 0.2.0 appears to have removed the contents attribute.

Workaround

Install with cosette 0.1.0:

uv tool uninstall shell-sage
uv tool install shell-sage --with cosette==0.1.0

Suggested Fix

Either:

  1. Pin cosette to <0.2.0 in dependencies, or
  2. Update code to work with cosette 0.2.0's new API

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions