Skip to content

Add docs for debugging with uv #24

@gingin77

Description

@gingin77

I've been using TCT as a module imported into another project, but have run into issues over the past few months. Ultimately, these suggestions may be outside of the scope of TCT, but were helpful for troubleshooting to determine if my problem was actually a problem with TCT or a problem with how TCT is installed as a project dependency.

Original Problem: I couldn't run a script that makes calls to TCT resources. Script would hang hang without any error info.

  • Commenting out the TCT import line resolved the hangtime:

    from TCT import name_resolver, translator_kpinfo, translator_metakg

Resolution: The .venv had many issues, "27 incompatibilities" reported by uv pip check. Scrapping and rebuilding solved the problem, rm -rf .venv && uv sync.

I put together the notes below for my own reference in the project where I'm working.

# In the past, running a TCT upgrade helped fix TCT issues
% uv pip install --upgrade TCT
⠧ click==8.3.1   
    error: Failed to fetch: `https://pypi.org/simple/fastmcp/`
  Caused by: request or response body error
  Caused by: operation timed out

# I tried to remove TCT
% uv remove TCT
warning: Failed to uninstall package at .venv/lib/python3.13/site-packages/cyclopts-4.2.4.dist-info due to missing RECORD file. Installation may result in an incomplete environment.

# The following revealed many dependency problems beyond TCT
% uv pip check
Checked 220 packages in 7ms
Found 27 incompatibilities
The package `jupyter-events` is broken or incomplete (unable to read `METADATA`). Consider recreating the virtualenv, or removing the package directory at: /Users/ginniehench/Desktop/dev_projects/aop_analytics/.venv/lib/python3.13/site-packages/jupyter_events-0.12.0.dist-info.
....

# To fix incompatibilities, remove the `.venv` && rebuild it with uv sync
% rm -rf .venv && uv sync

# View tct dependencies
% uv pip show tct 
Name: tct
Version: 0.1.6
Location: /Users/ginniehench/Desktop/dev_projects/aop_analytics/.venv/lib/python3.13/site-packages
Requires: click, fastmcp, ipycytoscape, ipykernel, jsons, matplotlib, networkx, numpy, openai, pandas, pyvis, requests, seaborn
Required-by:

# Run pip check again - no more messages about broken or incomplete metatdata!!!
% uv pip check
Checked 263 packages in 13ms
All installed packages are compatible

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions