Questions tagged [file-structure]
257 questions
0
votes
2 answers
Import of another python function does not work
I have the following directory structure:
GNS
gns_export.py
new_structure
DB_Manager.py
and other Files that are not important.
When I now try to import a function from DB_manager.py in gns_export.py, I get an error.
In gns_export.py:
from…

Clemens Hodina
- 1
- 1
0
votes
1 answer
Magento 2 Checkout_module JS structure
I have been learning magento since past 2 months but i have been stuck at a point in learning .
What i can't understand is Why there are 3 folders in JS of checkout_module VIEW,ACTION,MODEL
are they for any reason or they just created it to keep…

Abhishek
- 1
- 1
0
votes
1 answer
How can I get my Python script to work correctly with both normal execution and pytest?
I'm stuck on import issues while using pytest. My file structure looks like:
src/
| __init__.py
| main.py
| util.py
tests/
| __init__.py
| test_main.py
tox.ini
If I want to run main.py with something from util.py normally, I would use the import…

j-carrara
- 1
- 1
0
votes
0 answers
EXE created with PyInstaller: "Cannot copy tree 'Y': not a directory"
I converted a file, main.py, into main.exe, using PyInstaller. main.py doesn't throw any error, but main.exe does.
The script didn't execute fully, so I used a try-catch and got this:
Cannot copy tree 'Y': not a directory
It looks like it's a…

The Amateur Coder
- 789
- 3
- 11
- 33
0
votes
0 answers
Python local imports still not working: ModuleNotFoundError or ImportError
How can I import src/constants.py from within src/data/compute_embeddings.py?
Project structure
I have the following project structure:
.
├── data
│ └── raw
│ └── sample.xlsx
├── __init__.py
├── notebooks
│ └── clustering.ipynb
└── src
…

Joris Limonier
- 681
- 1
- 10
- 27
0
votes
1 answer
how to reach icon for xamarin menu
I have created menu in Xamarin forms for Android. I only see text, no icons:
I think I simply dont know where to put icons correctly to reach them from my menu file. I have files structure like this:
And I try to reach PatientInfo.png from…

vytaute
- 1,260
- 4
- 16
- 36
0
votes
2 answers
How to use source() in a .Rmd file when accessing code from multiple folders?
I've started to explore calling and reusing code snippets in various .Rmd projects. I'm running into issues though with the working directory not being able to access the correct files.
Take this file structure, for instance:
R/
├─ code/
│ ├─…

seansteele
- 619
- 3
- 10
0
votes
1 answer
Error: Can't resolve './components/Upload' and './components/Results' in React App
I am building a react-app front-end for Amazon AWS S3 and I am having trouble importing the 'Upload' and 'Results' components from the 'components' folder. The 'Upload.js' and 'Results.js' files are located in the 'src/components' folder, but when I…

Jinxlo P2p
- 3
- 3
0
votes
0 answers
How do I adapt my import statements to my folder structure in Django?
I just set up a basic folder structure for a new project, however I am doing it a bit different than the standard file structure, since my front-end is in React and will be in a separate git repository. The problem is, my virtual environment is…

Jennifer R.
- 1
- 1
0
votes
0 answers
NextAuth + NextJS v12 api folder structure
Is it required to put the signin and signup components inside api/auth path? because I put mine same as other pages file.
|- pages
|- api (folder)
|- auth (folder)
|- _app.js
|- _index.js
|- login.js #import…

mjw
- 11
- 2
0
votes
2 answers
Accessing a folder outside the current folder for a file path in JS
I am a new JS programmer and am working on a game in HTML/JS. There is an inventory, and I need to have access to all the possible item assets in the root/inventoryAssets folder. I am wondering how to access this folder from inside of another folder…

Michael Kielbasinski
- 25
- 7
0
votes
1 answer
How can you implement transfer learning with Yolov4 on colab?
I am trying to follow this tutorial for using Yolov4 with transfer learning for a new object to detect: https://sandipanweb.wordpress.com/2022/01/17/custom-object-detection-with-transfer-learning-with-pre-trained-yolo-v4-model/. In trying to set up…

jmuth
- 71
- 4
0
votes
0 answers
How to make Index.js file in next.js middleware folder to work as a middleware file?
I have seen from the next.js docs that they now support middleware. To use the middleware functionality you need to:
create a middleware.ts (or .js) file at the root or in the src
directory (same level as your pages).
When I do that it works. I…

YulePale
- 6,688
- 16
- 46
- 95
0
votes
0 answers
How can I deploy a multi project in angular to use wildcard that displays user details
I more clarification on how to deploy a multiple Angular project, such that the URL would be like username.example.com. I also need to use the username to fetch the data for the user in question like example.com/username/profile.
How can I achieve…

Emuohwo
- 11
- 1
0
votes
0 answers
Static Website Folder Structure - Reusability
I'm creating a static site built with HTML and Javascript. I'd like to maintain a reusable html structure for the site for a subset of the pages. Similar to how Yelp organizes their file structure. For example, the user can search for different auto…