Python: having a file called "model.py" gets stuck installing gardenlinux

Problem description:

When I have a file called model.py, the import-guessing system gets stuck installing a bogus package. Here is what I got when trying to run unit tests:

--> poetry add gardenlinux git-python
Using version ^1.1735.0 for gardenlinux
Using version ^1.0.3 for git-python

Updating dependencies
Resolving dependencies...

It is possible to disable resolve this for Run by adding these lines to the .replit file as described here:

disableInstallBeforeRun = true
disableGuessImports = true

But, this does not seem to affect the Unit Tests button.

Expected behavior:

I love the import guessing feature, but two suggestions (1) maybe don’t guess packages like gardenlinux that seem to be defunct (2) give the user feedback on what is causing the guess.

Actual behavior:

Steps to reproduce:

  1. Create a Python project.
  2. Create a file called model.py
  3. Add import model to the top of main.py
  4. Hit run and it gets stuck, or start unit tests and it gets stuck.

Bug appears at this link: https://replit.com/@arjun-northeastern/Broken-Tests-and-Running

Browser: Firefox
OS: Ubuntu 22.04
Device (Android, iOS, NA leave blank): NA
Desktop app version (Avatar menu->“Version”) or NA: NA
Plan (Free, Replit Core): Replit Core

1 Like

The below bug report is about the same issue, with more information, and also includes a workaround.

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.