cmd

Python Sightengine (API) – 'sightengine' has no attribute 'Client' Error

Python Sightengine (API) – 'sightengine' has no attribute 'Client' Error Question: I am currently writing the code for an reddit scraper. I wanted to use Sightengine for scanning for inappropriate content within the downloaded videos. I have problems communicating with the api (I cant fully describe it), however – this is the cmd output that …

Total answers: 1

Problem with split a cmd string in python

Problem with split a cmd string in python Question: The cmd.split() does not work: cmd = f’git log –all –grep="fixed bug" –pretty="%H|%an"’ process = subprocess.Popen(cmd.split(), stdout=subprocess.PIPE, stderr=subprocess.PIPE) Generate this error: With this code instead it works. cmd = f’git log –reverse –pretty=format:"%H|%an|%at"’ It is not a problem of "bugs" because leaving only "fixed" does not …

Total answers: 1

Facing issues when running a shiny app for Python locally

Facing issues when running a shiny app for Python locally Question: I want to run shiny app for python locally. The following code works like a charm: cd/d D:/app1 py from shiny import run_app run_app() However, when I try the following code, it does not work. cd/d D: py from shiny import run_app run_app("app1:app") Any …

Total answers: 1

How to fix FileNotFoundError

How to fix FileNotFoundError Question: The function takes a list of paths to all folders and checks if it is empty. If empty, it deletes. But after she deleted the folder, the error FileNotFoundError: [WinError 3] The system cannot find the path specified: ‘\Projects\Example\New folder’ appears. I do not fully understand why it is looking …

Total answers: 1

Passing command to the called script

Passing command to the called script Question: I would like to call a script named openseessp and then pass "source test.tcl" argument to this script. I tried with subprocess module but after it invoked openseessp it exits and then runs source test.tcl command. I need to run this without exiting the first (openseessp): subprocess.run([‘openseessp’, ‘source …

Total answers: 1

OSError: [WinError 123] Syntax error in file name, folder name, or volume label

OSError: [WinError 123] Syntax error in file name, folder name, or volume label Question: I am a beginner Python user. I ran into a problem when installing the "Kivy" package, even any package, I get an error "OSError: [WinError 123] Syntax error in file name, folder name, or volume label". Here my error: ERROR: Exception: …

Total answers: 1

Accepting a path as a command line argument instead of an input in python

Accepting a path as a command line argument instead of an input in python Question: I am tasked with creating an app using python to sort files in a given directory. I want the input path to be passed as a command line argument using cmd_parser.add_argument() instead of being accepted as normal input after running …

Total answers: 2

How to create django project

How to create django project Question: What commands should I write in cmd. When I write: django-admin startproject myproject, it does not create a config folder in my project. What do I miss? Asked By: Timur || Source Answers: Try using "$ django-admin startproject myproject", the myproject should be the folder that contains your project. …

Total answers: 1

Open any program from cmd in python

Open any program from cmd in python Question: I want to open a program in Python in a path error in cmd: The system cannot find the file steam.exe. import os os.system(‘start steam.exe "D:Program Files (x86)Steam"’)“` Asked By: Mohammad Garousi || Source Answers: use subprocess: import subprocess subprocess.call([‘D:Program Files (x86)Steam\steam.exe’]) Answered By: Zack Walton

Total answers: 1