What the error


what the error ?

1 Like

Hi,

Could you share the contents of the requirements.txt file?

1 Like

1 Like

There is no googletrans==4.0.0. There may be more issues, since the other packages are quite old. There should be more details in the logs.

1 Like

But how can I give you a link to the project on GitHub?

1 Like

Copy the link from the address bar and paste it here.

1 Like

You are still trying to install googletrans==4.0.0 which does not exist. Why did you put that in your requirements.txt?

1 Like

Because it is included in the code

1 Like

What should I do to solve the problem?

1 Like

The code doesnโ€™t ask for that specific version. Why did you choose version 4.0.0? It doesnโ€™t exist.

1 Like

I am a new learner, and at the beginning I heard about the Streamlit library, and it will be useful to me as a data analyst, so I said, โ€œI will start with something simple and try the library with it,โ€ and I created this.
With the first problem, I understood that I had to create a requirements
I used the pipreqs library to create a requirements file for me so that I could use it, and this is what I created.

1 Like

So the requirements file was made by pipreqs. Now thngs start making some sense. But not quite, because if I run pipreqs on that code in a fresh environment I get different versions:

googletrans==3.0.0
gtts==2.4.0
streamlit==1.29.0

Did you have those packages already installed in your computer when you ran pipreqs? If the answer is yes, how did you install googletrans there? Did you ever make the application work locally?

1 Like

Yes, I ran the program and it worked well as localhost, and I can prove that to you with a video if you want

1 Like

If I want an easy way to be able to add a valid requirements file
Is there a way?

1 Like

Well, it depends. In this case, I am not sure. You seem to have googletrans==4.0.0 in your computer, but the latest available version seems to be 3.0.0, which may or may not work for you.

It the application works in your computer, then the first thing that comes to my mind is trying to replicate the local environment in streamlit cloud as much as possible. That is why I asked you how you installed googletrans in your computer.

1 Like

Well, I copied the requirements file and used it in the code, and now it appears, but another problem occurred, which is when I run the code and translate anything, the problem appears even though this same code works as localhost.
I will post a picture of the problem for you

1 Like

1 Like

You are now using a different version of googletrans that, as I said, may or may not work for you (turns out it doesnโ€™t seem to work). That is why I asked you how you installed googletrans==4.0.0 in your computer.

1 Like

From the GoogleTrans library installed on my device
These are the versions
googletrans==4.0.0rc1
googletrans-py==4.0.0

1 Like