path

How to load fonts from GCS(problem solved)

How to load fonts from GCS Question: I want to load "fonts" from Google Storage, I’ve try two ways, but none of them work. Any pointers? Appreciated for any advices provided. First: I follow the instruction load_font_from_gcs(uri)given in the answer here, but I received an NameError: name ‘load_font_from_gcs’ is not defined message. I installed google …

Total answers: 1

Powershell Filepath command is being altered by Pycharm

Powershell Filepath command is being altered by Pycharm Question: I’m trying to run a file path powershell command through python. ` import subprocess subprocess.call(‘powershell.exe cd OneDriveDesktopOpenPoseopenpose-1.7.0-binaries-win64-gpu-python3.7-flir-3d_recommended’, shell=True) ` The error message displays: Cannot find path ‘C:UserscubeowOneDriveDesktopOpenPoseImplementationOneDriveDesktopOpenPoseopenpose-1.7.0-binarie s-win64-gpu-python3.7-flir-3d_recommended’ because it does not exist. The error message showed that they had added a root path in front …

Total answers: 1

VS code: Updated PYTHONPATH in settings. Import autocomplete now works, but module not found when running program

VS code: Updated PYTHONPATH in settings. Import autocomplete now works, but module not found when running program Question: I have been trying to fix a problem while running python files in VSCode. I have a directory with a program my_program.py that imports a module personal_functions.py from a folder packages_i_made. project ├── .env └── folder_a ├── …

Total answers: 2

ModuleNotFoundError: No module named 'yolov7.models'

ModuleNotFoundError: No module named 'yolov7.models' Question: I’m trying to move BotSORT on DockerContainer. I wrote the code below on jupyter-notebook.Then,the Error written on title is occured. Folder construct is below. Am I wrong about path? I’m new to Machine Learning. Could anyone give me some advice? thanks. Asked By: y_ok || Source Answers: You seem …

Total answers: 2

How can I run cv2.dnn.readNetFromDarknet command

How can I run cv2.dnn.readNetFromDarknet command Question: model=cv2.dnn.readNetFromDarknet("C://Users//deniz//Desktop//yolofiles//yolov3-coco_directory//yolov3.cfg","C://Users//deniz//Desktop//yolofiles//yolov3-coco_directory//yolov3.weights") here is my code but whenever i wrote this code it returns as error cv2.error: OpenCV(4.6.0) D:aopencv-pythonopencv-pythonopencvmodulesdnnsrcdarknetdarknet_importer.cpp:210: error: (-212:Parsing error) Failed to open NetPara When i write the command to terminal I also got this error(cv2.dnn.readNetFromDarknet : The term ‘cv2.dnn.readNetFromDarknet’ is not recognized as the name of …

Total answers: 1

Get Path to Python File Before Installation

Get Path to Python File Before Installation Question: I have a project that includes c++ binaries and python scripts, it’s setup such that it should be installed using setuptools. One of the python files is intended to be both used as a script " python3 script_name.py params and for it’s primary function to be used …

Total answers: 2

str.replace backslash with forward slash

str.replace backslash with forward slash Question: I would like to replace the backslash in a windows path with forward slash / using python. Unfortunately I’m trying from hours but I cannot solve this issue.. I saw other questions here but still I cannot find a solution Can someone help me? This is what I’m trying: …

Total answers: 1

cv2.imread file with accent (unicode)

cv2.imread file with accent (unicode) Question: I am trying to load the following file: ‘data/chapter_1/capd_yard_signs\Dueñas_2020.png’ But when I do so, cv2.imread returns an error: imread_(‘data/chapter_1/capd_yard_signsDue├▒as_2020.png’): can’t open/read file: check file path/integrity load file When I specified the file name with os.path.join, I tried encoding and decoding the file f = os.path.join("data/chapter_1/capd_yard_signs", filename.encode().decode()) But that didn’t …

Total answers: 2

os Path "FileNotFoundError: [Errno 2] No such file or directory:"

os Path "FileNotFoundError: [Errno 2] No such file or directory:" Question: I’m trying to open files from this path C:UsersUsuarioLlamasllamas-pythonface but I’m getting FileNotFoundError: [Errno 2] No such file or directory: im1 = Image.open(f’ ./llamas-python/face/{face_files[item["Face"]]}.png’).convert(‘RGBA’) Any help¡? Asked By: dp Audiovisual || Source Answers: Try something like im1 = Image.open(f’.\llamas-python\face\{face_files[item["Face"]]}.png’).convert(‘RGBA’) Answered By: Gabriele Iovino

Total answers: 1

How to remove text from a string after a specific character?

How to remove text from a string after a specific character? Question: My program is like the command prompt (cmd) but much simpler. I am creating a command called, ‘bd’ which stands for back (one) directory. There is a path string: path = "C:/Program Files/node.js" and I want to remove the last directory ‘/node.js’ but …

Total answers: 2