Failed to add packages, reverting the pyproject.toml file to its original content. exit status 1

Description of the problem (please keep it simple and short):
Hello,
Newbie here!

I have been trying to run code and import a py file however
It seems like like it is running into some error when processing everything.
The output shows the data from the py file imported, however everytime I re-run the code, it goes over the import process all overagain.

Has anyone come across the same error?

Hello, this is an unfortunate side effect of replit package manager “import autoguessing”. Replit is trying to guess which packages you are using and it sees you are importing “game_data” and “art”, but it incorrectly thinks these are third party package imports.
To fix, click three dots near files and then Show hidden files, then open .replit file. Underneath the entrypoint variable, insert this:

disableGuessImports = true

Then, enter poetry remove plane-war in the shell.
Now, the problem should be gone.

This issue will probably be fixed soon:

1 Like

Did you copy and paste this answer from another of your posts without editing it? The context was not given; so none of the modules you mentioned might be in OP’s repl.

Nah, I check the OP’s profile since a lot of posters do not provide a link to repl. The recent python repl seems to be the one in question (~1 hr difference).
Everything else in my post is based on the assumption that that repl is the one in question (and also is not copy-pasted).

Hm, I remember another topic about auto-installing plane-war. Coincidence or same one?

?

I assume 1 hr from edit time to posting here time

To clarify, 1 hr difference between topic creation and repl creation.

The reason why plane-war is the same is because it is the same exact tutorial template as the other I think, “higher-lower-start”. (So they both use game_data, leading to plane-war).

1 Like

Hi, I have the same issue.
Each re-run took something like 30 sec.
When I add “disableGuessImports = true” into .replit, the issue disappears but the code doesn’t run and I have just the console.
“poetry remove plane-war” brings to error:
image
I also tried to rename “game_data.py” and “art.py” but it doesn’t work.

I was having the same issue. Open the .replit file and find the line that says ‘guessImports = true’ , for me it was on line 89 of the .replit file, and switch it to false.

That worked.
Thanks!