question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

unexpected keyword argument 'capture_output' on startup

See original GitHub issue

Hey. First of all: many thanks for the effort to keep software free and open source ❤️

In contrast to insomniac I have an issue on startup the app and I can’t find the point to fix it:

(.venv) ➜  bot git:(master) python3 run.py --blogger-followers kwerfeldein --device ce01171159e094490c
[11/22 15:33:06]     INFO | GramAddict 1.0.4
[11/22 15:33:06]     INFO | Loading plugins . . .
[11/22 15:33:06]     INFO |   - ActionUnfollowFollowers: This plugin handles the functionality of unfollowing your followers
[11/22 15:33:06]     INFO |   - CoreArguments: This plugin simply adds core arguments
[11/22 15:33:08]     INFO |   - DataAnalytics: Generates a PDF analytics report of specified username session data
[11/22 15:33:08]     INFO |   - InteractBloggerFollowers: This plugin handles the functionality of interacting with a bloggers followers
[11/22 15:33:08]     INFO |   - InteractHashtagLikers: This plugin handles the functionality of interacting with a bloggers followers
[11/22 15:33:08]     INFO | Instagram version: not found
[11/22 15:33:08]     INFO | -------- START: 2020-11-22 15:33:08.220735 --------
[11/22 15:33:08]     INFO | Open Instagram app
Traceback (most recent call last):
  File "run.py", line 3, in <module>
    GramAddict.run()
  File "/home/julian/d/bot/GramAddict/__init__.py", line 154, in run
    open_instagram(device_id)
  File "/home/julian/d/bot/GramAddict/core/utils.py", line 80, in open_instagram
    cmd_res = subprocess.run(cmd, capture_output=True, shell=True, encoding="utf8")
  File "/usr/lib/python3.6/subprocess.py", line 423, in run
    with Popen(*popenargs, **kwargs) as process:
TypeError: __init__() got an unexpected keyword argument 'capture_output'

When I list the connected devices, it shows me my phone

(.venv) ➜  bot git:(master) adb devices                                                               
List of devices attached
ce01171159e094490c	device

The screen is active when I start the script. The dependencies are installed.

Can anyone give me a hint how to solve it?

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:5 (3 by maintainers)

github_iconTop GitHub Comments

1reaction
jlntrtcommented, Nov 22, 2020

Many thanks to @arthurspa for the PR #93

This fixes the issue 😃

(.venv) ➜  bot git:(fix-92-unexpected-capture-output-py36) python3 run.py --blogger-followers kwerfeldein --device ce01171159e094490c
[11/22 21:04:29]     INFO | GramAddict 1.0.5
[11/22 21:04:29]     INFO | Loading plugins . . .
[11/22 21:04:29]     INFO |   - ActionUnfollowFollowers: This plugin handles the functionality of unfollowing your followers
[11/22 21:04:29]     INFO |   - CoreArguments: This plugin simply adds core arguments
[11/22 21:04:30]     INFO |   - DataAnalytics: Generates a PDF analytics report of specified username session data
[11/22 21:04:30]     INFO |   - InteractBloggerFollowers: This plugin handles the functionality of interacting with a bloggers followers
[11/22 21:04:30]     INFO |   - InteractHashtagLikers: This plugin handles the functionality of interacting with a hashtags likers
[11/22 21:04:30]     INFO |   - LikeFromURLs: This plugin handles the functionality to likes all post from url reading a plaintext file
[11/22 21:04:30]     INFO | Instagram version: not found
[W 201122 21:04:30 __init__:203] atx-agent has something wrong, auto recovering
[D 201122 21:04:30 __init__:286] device ce01171159e094490c is online
[I 201122 21:04:31 init:155] uiautomator2 version: 2.11.2
[11/22 21:04:33]     INFO | -------- START: 2020-11-22 21:04:33.602267 --------
[11/22 21:04:33]     INFO | Open Instagram app
[D 201122 21:04:36 __init__:598] kill process(ps): uiautomator
[D 201122 21:04:38 __init__:617] uiautomator-v2 is starting ... left: 40.0s
[D 201122 21:04:39 __init__:617] uiautomator-v2 is starting ... left: 39.0s
[D 201122 21:04:40 __init__:617] uiautomator-v2 is starting ... left: 38.0s
[D 201122 21:04:41 __init__:617] uiautomator-v2 is starting ... left: 36.9s
[D 201122 21:04:42 __init__:617] uiautomator-v2 is starting ... left: 35.9s
[D 201122 21:04:43 __init__:617] uiautomator-v2 is starting ... left: 34.9s
[D 201122 21:04:44 __init__:617] uiautomator-v2 is starting ... left: 33.9s
[D 201122 21:04:45 __init__:617] uiautomator-v2 is starting ... left: 32.8s
[I 201122 21:04:45 __init__:581] uiautomator back to normal
0reactions
philip-ulrichcommented, Nov 22, 2020

Closing! 😄

Read more comments on GitHub >

github_iconTop Results From Across the Web

subprocess: unexpected keyword argument capture_output
3 Answers 3 · 1. I get "name 'PIPE' is not defined" if I try to use the solution provided here. – Scorb...
Read more >
TypeError: __init__() got an unexpected keyword ... - GitHub
Tried it on my Raspberry Pi and got this error: sudo ./detect.py 192.168.1.0/24 data.db Traceback (most recent call last): File ".
Read more >
Subprocess management — documentation Python 3.7.0a0
Partial support of the Windows STARTUPINFO structure is used for Popen creation. The following attributes can be set by passing them as keyword-only...
Read more >
How To Use subprocess to Run External Programs in Python 3
Importantly, however, we pass the capture_output=True and text=True keyword arguments to subprocess.run . subprocess.run returns a subprocess.
Read more >
10+ practical examples to learn python subprocess module
Wait for the command to complete; Capture output from command ... __init__() got an unexpected keyword argument 'capture_output' .
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found