您好,我正在构建一个不和谐的机器人,并且想在其中使用 ffmpeg,但正在开发repl.it。如果可以的话,如何在 repl.it 上使用 ffmpeg?
这是为了将 .webm 文件转换为 .mp4 文件,在 python 3.7.4 上运行。我查看了 repl.it 论坛和 Stack Overflow,但找不到任何信息。
谢谢!
我正在为我的discord.py 机器人创建一个kick 命令。以下是 kick 命令可能的一些代码:
async kick_command(self, ctx, userName: discord.User):
prefix_used = ctx.prefix
alias_used = ctx.invoked_with
text = msg[len(prefix_used) + len(alias_used):]
if discord.User permissions = "admin":
try:
kick(User)
except Exception as e:
ee = "Error: " + e
await ctx.send_message(content=ee)
Run Code Online (Sandbox Code Playgroud)
我很确定 if 语句 和kick(User)是无效语法。你能帮助我吗?
我的代码: 点击这里
所以我正在使用我的机器人,但由于它没有响应,我决定检查它离线的原因。我打开我的代码,在控制台中发现了这个错误。我只是想知道这意味着什么。这里 :
\n<--- Last few GCs --->\n\n[880:0x4b70e20] 26014144 ms: Mark-sweep 234.2 (257.5) -> 234.2 (257.8) MB, 2824.5 / 0.0 ms (average mu = 0.148, current mu = 0.008) allocation failure scavenge might not succeed\n[880:0x4b70e20] 26017038 ms: Mark-sweep 234.6 (257.8) -> 234.5 (257.8) MB, 2888.0 / 0.0 ms (average mu = 0.081, current mu = 0.002) allocation failure scavenge might not succeed\n\n\n<--- JS stacktrace --->\n\n==== JS stack trace =========================================\n\nSecurity context: 0x1f02f9e808d1 <JSObject>\n 0: builtin exit frame: parse(this=0x1f02f9e9ee79 <Object map = …Run Code Online (Sandbox Code Playgroud) 我正在尝试在 Repl 中使用 Selenium,但由于某种原因它似乎不起作用,有办法解决这个问题吗?
chrome_options = Options()
chrome_options.add_argument('--no-sandbox')
chrome_options.add_argument('--disable-dev-shm-usage')
driver = webdriver.Chrome(options=chrome_options)
driver.get("https://www.youtube.com/watch?v=dQw4w9WgXcQ")
views = driver.find_element_by_class("view-count style-scope ytd-video-view-count-renderer")
print(views)
Run Code Online (Sandbox Code Playgroud)
这是我似乎遇到的两个错误。
Traceback (most recent call last):
File "/home/runner/JustStuff/venv/lib/python3.8/site-packages/selenium/webdriver/common/service.py", line 71, in start
self.process = subprocess.Popen(cmd, env=self.env,
File "/nix/store/p21fdyxqb3yqflpim7g8s1mymgpnqiv7-python3-3.8.12/lib/python3.8/subprocess.py", line 858, in __init__
self._execute_child(args, executable, preexec_fn, close_fds,
File "/nix/store/p21fdyxqb3yqflpim7g8s1mymgpnqiv7-python3-3.8.12/lib/python3.8/subprocess.py", line 1704, in _execute_child
raise child_exception_type(errno_num, err_msg, err_filename)
FileNotFoundError: [Errno 2] No such file or directory: 'chromedriver'
Run Code Online (Sandbox Code Playgroud)
Traceback (most recent call last):
File "main.py", line 15, in <module>
driver = webdriver.Chrome(options=chrome_options)
File "/home/runner/JustStuff/venv/lib/python3.8/site-packages/selenium/webdriver/chrome/webdriver.py", …Run Code Online (Sandbox Code Playgroud) 我正在使用 Replit 网站使用 GHC 运行 Haskell 程序。我在编辑器中输入代码并使用“运行”按钮运行它,而不仅仅是使用 GHCi 运行代码行。getLine每当我使用该函数时,即使在极其简单的程序中,我也会遇到奇怪的输出问题。例如,运行程序
main = do ans <- getLine
putStrLn ans
Run Code Online (Sandbox Code Playgroud)
hi在输入提示处键入会打印hi两次而不是一次:
cabal v1-run
Preprocessing executable 'Cabal-example' for Cabal-example-0.1.0.0..
Building executable 'Cabal-example' for Cabal-example-0.1.0.0..
[1 of 1] Compiling Main ( Main.hs, dist/build/Cabal-example/Cabal-example-tmp/Main.o )
Linking dist/build/Cabal-example/Cabal-example ...
Running Cabal-example...
hi
hi
hi
Run Code Online (Sandbox Code Playgroud)
当我尝试禁用函数中的输入/输出缓冲时,问题变得更加奇怪main(我需要为我正在开发的更大的程序执行此操作):
cabal v1-run
Preprocessing executable 'Cabal-example' for Cabal-example-0.1.0.0..
Building executable 'Cabal-example' for Cabal-example-0.1.0.0..
[1 of 1] Compiling Main ( Main.hs, dist/build/Cabal-example/Cabal-example-tmp/Main.o )
Linking dist/build/Cabal-example/Cabal-example ...
Running …Run Code Online (Sandbox Code Playgroud) replit ×5
python ×3
discord ×1
discord.js ×1
discord.py ×1
ffmpeg ×1
ghc ×1
haskell ×1
io ×1
node.js ×1
python-3.x ×1