I’ve been trying to solve this issue, but right now I need some help. I’m trying to upload this JSON file (DBL) in Spyder IDE. I have stored the JSON-data file and the Spyder file, in the same map in order to read the JSON file, but it’s not working. My Python code: import json ..
I am dealing with a file directory in python, where I want to delete files containing a specific string, ultimately using os.remove(), but I just cannot get it to work. I will elaborate further here by showing the code I am using: directory = ‘source_folder’ for color in colors: for size in sizes: for speed ..
I am trying to use python to move only certain files from an old folder to a new folder, and I am having trouble trying figuring out the work flow and logic for how this would work. I have the following existing older hierarchy: Folder >Red >Big >Easy >File_Big_Red_x_0.csv >File_Big_Red_x_1.csv >File_Big_Red_x_2.csv >File_Big_Red_x_3.csv >File_Big_Red_x_4.csv >Medium >File_Big_Red_x_0.csv ..
I want to create subfolders with related images for each class. Now, I only have a folder with all images. I created a .csv with images_id and labels. I was able to create the subfolders based on the labels but I cant move the images in the related subfolders. My folder structure looks likes that: ..
I have done object detection using Yolov5 and I saved the result in csv file. The csv file has 6 columns: labeled, bbox coordinator (x,y,w,h), score as shown in image below. How to find the pixel values for each object detected?? Source: Python..
I am trying to copy specific files from one folder to another but it raise me the error: IOError: [Errno 2] No such file or directory: ‘AERIAL_P.dbf’ altought the file exists in the main folder. I attached a picture with my code. enter image description here How can I resolve this error. Thank you Source: ..
I have a folder that is consistently Syncing the files, and I Must Manually Refresh (Right Click> Refresh) the folder to See Changed Contents. So, I need to refresh a folder in a loop every 10 minutes. Folder Path to Refresh C:/Users/Student/My Dropbox/New Folder/15-2 Example from aModule import refreshdir # Fake refreshdir("C:/Users/Student/My Dropbox/New Folder/15-2") How ..
So I have this python program and it has subfolders. So here is the folder Root/main.py (The folder I want to import a function from) Root/modules/help/embeds/help_embed.py (The file i wanna import to) I have tried from main.py import some_func, from Root/main.py import some_func What do I do? Source: Python..
Traceback (most recent call last): File "/content/drive/MyDrive/VAE/NVDM_Query_Search/tokennvdm.py", line 32, in os.chdir(path) FileNotFoundError: [Errno 2] No such file or directory: ‘/content/drive/MyDrive/VAE/NVDM_Query_Search/data/20NG/train ‘Code snippet is in the image Source: Python..
I want to import a python file from another directory. I can import the stuff but it can’t find those dependencies in the python file and raises me the ModuleNotFoundError exception. These trees might help: app1: pkgs/ main.py app2: script.py Here is the app1/main.py file: from pkgs import * def main(): … I want to ..