liofal / streamlink

MIT License
10 stars 9 forks source link

'Streamlink' object has no attribute 'set_plugin_option' #17

Closed MatKos169 closed 6 months ago

MatKos169 commented 6 months ago

Hi, i just setup your Container. But it keeps Crashing on Recording start. Console Log:

info:__main__:Checking for Heideltraut every 360 seconds. Record with best quality.
info:__main__:Recording Heideltraut ...
Traceback (most recent call last):
  File "/app/./streamlink-recorder.py", line 77, in <module>
    main()
  File "/app/./streamlink-recorder.py", line 74, in main
    loop_check(config)
  File "/app/./streamlink-recorder.py", line 49, in loop_check
    streamlink_manager.run_streamlink(config.user, recorded_filename)
  File "/app/streamlink_manager.py", line 14, in run_streamlink
    session.set_plugin_option("twitch", "oauth-token", self.config.twitch_account_auth)
    ^^^^^^^^^^^^^^^^^^^^^^^^^
AttributeError: 'Streamlink' object has no attribute 'set_plugin_option'

provided Env data:

clientid = xxx
clientsecret = xxx
quality = best
timer = 360
twitchaccountauth = xxx
user = Heideltraut

I also mounted a network drive to /download.

Thank you in advance

liofal commented 6 months ago

hi there, sorry to hear your trouble, can you tell me more about the version of container you are running? so far I cannot reproduce with either docker.io/liofal/streamlink:latest or ghcr.io/liofal/streamlink:latest

liofal commented 6 months ago

I juste have updated the latest tag of the images on both container registries, can you try and pull again the image and let me know if you still have this output?

MatKos169 commented 6 months ago

Hi thanks for your reply,

just pulled the latest image from docker.io/liofal/streamlink:latest. Saddly no changes. Im Running docker Engine 26.1.2 on a Debian 12 Hyper-V VM.

As soon as i add the twitchaccountauth to the env the Container crashes on recording/Stream start. Without the auth key it complains about missing destination file while a volume is mounted to /download

liofal commented 6 months ago

you are right, this authentication feature has been removed in 2019 and is still implemented within my wrapper, which ends up in a runtime exception ... it needs to be replaced with either --twitch-access-token-param or --twitch-api-header... I will need some time to do this shift, meanwhile, if you dont specify the accountauth, it should no longer crash, as a result you might get recording of ads within your stream? I have hot fixed version 3.1.1 so container won't crash anymore but configuration will be ignored. will work on implementation of new mechanism soon, will keep this opened meanwhile.

MatKos169 commented 6 months ago

no sadly still no recording at all. Seams like it gets to the recording part of things but stops caused by a FileNotFoundError


Traceback (most recent call last):
  File "/app/./streamlink-recorder.py", line 77, in <module>
    main()
  File "/app/./streamlink-recorder.py", line 74, in main
    loop_check(config)
  File "/app/./streamlink-recorder.py", line 49, in loop_check
    streamlink_manager.run_streamlink(config.user, recorded_filename)
  File "/app/streamlink_manager.py", line 22, in run_streamlink
    with open(recorded_filename, 'wb') as f:
         ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
FileNotFoundError: [Errno 2] No such file or directory: './download/LauraHunter - 2024-05-19 15-28-40 - LuckyV.de GER  18  Neue animierte Emotes  und GTA RP mit Puschel   LuckyV puschel  Werbung.mp4'```

Mounted a Networkshare to /download and tested the connection using a difrent container image.
any idear?
liofal commented 6 months ago

Dont forget to create the ./app/download folder or volume. On 19 May 2024, at 17:32, MatKos169 @.***> wrote: no sadly still no recording at all. Seams like it gets to the recording part of things but stops caused by a FileNotFoundError Traceback (most recent call last): File "/app/./streamlink-recorder.py", line 77, in main() File "/app/./streamlink-recorder.py", line 74, in main loop_check(config) File "/app/./streamlink-recorder.py", line 49, in loop_check streamlink_manager.run_streamlink(config.user, recorded_filename) File "/app/streamlink_manager.py", line 22, in run_streamlink with open(recorded_filename, 'wb') as f: ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ FileNotFoundError: [Errno 2] No such file or directory: './download/LauraHunter - 2024-05-19 15-28-40 - LuckyV.de GER 18 Neue animierte Emotes und GTA RP mit Puschel LuckyV puschel Werbung.mp4'```

Mounted a Networkshare to /download and tested the connection using a difrent container image. any idear?

—Reply to this email directly, view it on GitHub, or unsubscribe.You are receiving this because you commented.Message ID: @.***>

liofal commented 6 months ago

Hi @MatKos169,

Thank you for bringing this issue to my attention.

It appears that the set_plugin_option method has been deprecated. I've released version 3.2.0, which includes support for an alternative authentication mode using an optional OAuth token parameter for Twitch API requests.

To activate the new authentication mode, follow these steps:

Obtain your OAuth token from Twitch. You can find the procedure here.

Set the oauthtoken environment variable with your OAuth token:

oauthtoken=xxxxxxxx

Ensure the ./app/download folder is correctly created or mounted as a volume.

If you have any questions or run into issues, feel free to ask.

Best regards, liofal