7625965
February 13, 2024, 9:13pm
1
Question:
Repl link/Link to where the bug appears:
Screenshots, links, or other helpful context:
hi. I am a beginner and want to migrate my exercises code files from Pydroid to Replit. In Pydroid I have a folder with __init__
file (empty) and I am able to use an import statement to import classes from one file to another in the same folder like ‘from Foo import foo’. In Replit it doesn’t seem to work. What I am missing ? TYSM.
Hey @7625965 welcome to the forums!
It should work if those files or modules exist. Could you provide a link to your Repl so we can look into what could be causing the issue?
To share your code with others, you can simply link to your repl or paste and format the code into your post!
Linking to a repl
The easiest way to share your code is by linking to your repl. You can find the link by clicking on your repl title, clicking on Cover page, and clicking the button to copy the URL.
NOTE: only share repl join links or use the invite button with people you trust!
Sharing short code samples
Share a snippet of your code by wrapping it in backti…
Could you show your files tab?
If data_collector.py
is in a folder, you need to specify that.
from folder_name.data_collector import make_data_dictionary
2 Likes
That is not your files tab, that’s your list of repls. If you want to import something, it needs to be in the same Repl.
4 Likes
Just adding on here: repl data don’t carry over to other repls, so you can’t import files from other repls just like that. You’ll need to manually upload those files into the repl you want, to access that file.
Hope this helps!
4 Likes
7625965
February 14, 2024, 7:26am
10
Question:
Repl link/Link to where the bug appears:
Screenshots, links, or other helpful context:
code snippet
can’t figure out why I am getting ModuleNotFoundError
here is a link to a repl:
https://replit.com/@7625965/applicantage?s=app
here is a screenshot of files in a “snap” folder
here is an error I get:
what I am doing wrong?
TYA
Those are not files, but individual Repls.
Replit folders are separate from folders INSIDE of Repls.
Click this button, and there should be a button near the top-right to create a folder INSIDE of your Repl:
4 Likes
7625965
February 14, 2024, 7:40am
12
Thank you @QwertyQwerty88 . Now how I add the repls to the folder?
Hey @7625965 !
You can’t add Repls to a Folder in a Repl, you can copy the code and move it to your single Repl.
2 Likes
system
Closed
February 21, 2024, 1:17pm
14
This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.