Giter Club home page Giter Club logo

twitchcompilationcreator's Introduction

Logo

MIT License Code style: black
Platform: YouTube Platform: Twitch Tensorflow
Jinja Streamlink MoviePy

A fully automated system that transforms Twitch clips into gaming compilations

Video explanation (YouTube)

Authors: Christian C., Moritz M., Luca S.
Related Projects: Neural Networks, YouTube Uploader, YouTube Watcher


About

This is our approach of automatically creating compilations of twitch clips (focused on gaming). We are very interested in YouTube, Twitch and Programming so we started this as an experiment, now a few months later we have to say it worked!

What did we achieve?

  • We automatically uploaded over 100 videos to our YouTube channel without any human interaction
  • One video got quite some traction by getting 2155 views and 48 likes at that point we had 0 Subscribers and it was the 8th video of the channel
  • All our uploads combined got over 10k views
  • We didn't receive a single comment indicating the use of bots

So why do we publish this now instead of making money with it?

  • We came to the conclusion that we'd need to further optimize the videos to grow the channel which would require sophisticated and computationally expensive neural networks.
  • We do not own the copyright of the clips so theoretically somebody could claim the video. To legally monetize the content, we'd need to add value to the clips like funny comments with a good text-to-speech framework.
  • The language of some clips is declared as English by Twitch, even though the spoken language is not English. To filter those clips, a computationally expensive neural network for language-detection is required.

It was only an experiment without the direct goal of making money with it. Additionally, we think it is more valuable for us as a reference. If you are encountering any problems when running the code, feel free to open an Issue or a Pull Request with a possible fix.

Results

Example Video Screenshot Example Thumbnail

Example Description

[Fortnite] Twitch Highlights #10 | Fails, Satisfying/Funny Moments & Epic Wins!

🔔 SUBSCRIBE FOR MORE FORTNITE FAILS/WINS!
https://www.youtube.com/channel/UCqq27nknJ3fe5IvrAbfuEwQ?sub_confirmation=1

Welcome back to episode 10 of Daily Gaming Highlights | Fortnite!
We have some insane clips this episode.
If you liked and enjoyed the video be sure to leave a like and subscribe for more Fortnite content!
We upload a Fortnite video every monday once a week.
Also be sure to comment letting us know which your favorite clip was 😄

Featured Playlists:
• Daily Gaming Highlights: https://www.youtube.com/playlist?list=PLhOg0bYb-2IKbbV4rHerrtlWArm14bXdI
• Fortnite Highlights: https://www.youtube.com/playlist?list=PLhOg0bYb-2IICWc4MB-ZetkKGMTSvanye

🎬Featured clips/streamers:
Streamer1: https://clips.twitch.tv/AwkwardProtectiveDoritosChip
Streamer2: https://clips.twitch.tv/WimpyGleamingTTours

00:00 Streamer1
00:11 Streamer2

Golden Gorilla does not have the copyrights for the used clips.
If you are within a video and would like to get it removed please email us:
[email protected]

#GoldenGorilla #Fortnite #Fails #FunnyMoments #EpicMoments #Wins #EpicWins
#fortnitebattleroyale #season4 #twitch

Requirements

This project requires Poetry to install the required dependencies. Check out this link to install Poetry on your operating system.

Make sure you have installed Python 3.10! Otherwise Step 3 will let you know that you have no compatible Python version installed.

Additionally, this project requires ffmpeg and imagemagick.

There are a few additional steps depending on the operating system that are listed below:

Windows

  • Poetry
    • installing might throw errors which can be resolved by following this solution
    • you should use pip version ≥ 20.2.3 to avoid additional problems
  • ffmpeg
    • has to be added to the path, so it can be accessed directly with the streamlink command
  • imagemagick
    • you have to change the config_default as described here

Linux

  • imagemagick
    • make sure the line <policy domain="path" rights="none" pattern="@*"/> is NOT present in the imagemagick policy config (/etc/ImageMagick-6/policy.xml on Debian/Ubuntu). Comment out this line if it is found in the file to ensure that imagemagick is not restricted by the path access policy.*

Setup

  1. Clone/Download this repository
  2. Navigate to the root of the repository
  3. Run poetry install to create a virtual environment with Poetry
  4. Follow the Twitch Api Docs until you get your own CLIENT_ID and CLIENT_SECRET
  5. Optional: Follow the YouTube Data API Docs until you receive an API key
  6. Insert your Twitch(CLIENT_ID, CLIENT_SECRET) and optionally your YouTube(YT_API_KEY) into the config.py. It should look like the following

HINT: The example keys do not work.
# For the Twitch API
CLIENT_ID = "o42tebpdzmj5z811iycgcpmd82on24"
CLIENT_SECRET = "owdgx64t1dodleiuo49e5rg7rvk5iq"

DIRECTORIES = dict(raw_clips_dir="rawClips", compilation_dir="compilation")

# For the YouTube API
# Optional: Only required if you want continuous numbering (e.g. Example Video Title #1, #2, ..., #N) for your videos
# Note: The number (#N) is determined by the number of items in a given YouTube playlist (declared in metadata_config)
YT_API_KEY = "h5UYdzJHeZNWLTgGteh0J68k7icp9jp9vPJlbzF"
  1. Run poetry run python main.py to run the program. Alternatively you can run poetry shell followed by python main.py
  2. Enjoy :)

Script Explanations

APIHandler.py

This class contains static methods to handle all API request for the Twitch and YouTube API.

Clip.py

This dataclass is used to convert json data from the Twitch API to Clip objects. This makes the data easier accessible within the python code.

ClipHandler.py

This class determines which Twitch clips the compilation will be made of and process them. It will do the following:

  • call the Twitch API to get the clip metadata
  • check if clips are ingame by using a neural network
  • process 100 clip metadata at a time and fetch more metadata if necessary
  • download the clips one-by-one

ClipCompilationCreator.py

This class will use the clips from the ClipHandler to create a compilation of all clips with a logo and the name of the clip creator as overlay. It will do the following:

  • load all clips based on the metadata file
  • create an overlay text for each clip
  • composite all clips with their text and the logo
  • compress the audio of the compilation so the sound is equaly high for the whole compilation
  • render the finished compilation

MetadataHandler.py

This class will handle/create all metadata that is needed for a YouTube upload. It will do the following:

  • handle the loading, saving, and storage of the metadata
  • on every first load it will refresh the metadata. If clips got deleted in the raw_clips_dir it will remove them automatically from the metadata
  • use a template to create YouTube title and description based on the metadata_config of the game and the metadata of that specific compilation
  • create a thumbnail using a frame of one of the clips, a random emoji, the number of the playlists_items, a basic half transparent overlay, and the game logo

parser.py

This script is only for the ArgumentParser that will be used in the main.py. It simplifies the usage of the script by defining default values for every parameter aswell as types and help information. All parameters are optional so the script runs without parameters but they all work and can be used. To read more about this checkout the Run Parameters section.

utils.py

As the name indicates this script offers only utility functions. Those functions are used in basically every other script or class. It contains functions performing the following tasks:

  • formatting a string into the correct string format
  • adding any amount of seconds on top of a datetime.time value
  • getting start and end datetimes for a given timespan (e.g. last hour, last week, ...)
  • get a valid filename which removes all characters that may conflict with file handling operations
  • get the full path to the game folder in our own directory structure for a given game
  • get the full path of the previous compilation of a given game
  • create our directory structure
  • delete the whole directory structure
  • saving and loading txt as well as json files

Run Parameters

All of these parameters are optional and a default value will be used if they are not defined. You can also get these definitions by running main.py --help

-h, --help            show this help message and exit
-g GAME, --game GAME  
                      Declares for which game the compilation should be created. It uses fortnite as default
-ap ASSET_PATH, --asset_path ASSET_PATH
                      Path to the assets folder. If not declared it uses './assets' as default
-noc NUMBER_OF_CLIPS, --number_of_clips NUMBER_OF_CLIPS
                      How many clips should be used. For most use cases -ml will fit better since the length of clips can be between 1-60 seconds so a -noc 5 compilation could be 5 or 300 seconds long
-ts {day,week,month}, --timespan {day,week,month}
                      ['hour', 'day', 'week', 'month'] - timespan from when the clips should be taken. Default is week
-la LANGUAGE, --language LANGUAGE
                      Language of the clips. Default is en
-ml MIN_LENGTH, --min_length MIN_LENGTH
                      Length of the compilation in seconds. Default is 360 (6 minutes)
-mcc MAX_CREATOR_CLIPS, --max_creator_clips MAX_CREATOR_CLIPS
                      Number of clips used from a single creator. Default is 2
-mcd MIN_CLIP_DURATION, --min_clip_duration MIN_CLIP_DURATION
                      Minimal clip length. Default is 10
-o OUTPUT_PATH, --output_path OUTPUT_PATH
                      Output path - default is './TwitchClips'. This should not start with a '/', otherwise it will use it as an absolute path


twitchcompilationcreator's People

Contributors

christiancoenen avatar jorislimonier avatar lucaschilling avatar mormundhs-ma avatar wdroz avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

twitchcompilationcreator's Issues

Mobile support?

Is it possible to use this using ternux or UserLAnd terminals

TypeError: __init__() got an unexpected keyword argument 'vod_offset'

Here is the code
warning:root:No model for prediction available -> every clip is chosen as valid (ingame)
Traceback (most recent call last):
File "main.py", line 17, in
ch.get_clips(
File "C:\Users\Amogh\Desktop\TwitchCompilationCreator-2.0\src\ClipHandler.py", line 46, in get_clips
self.get_game_clips(utils.get_headers(), timespan, language, kwargs)
File "C:\Users\Amogh\Desktop\TwitchCompilationCreator-2.0\src\ClipHandler.py", line 78, in get_game_clips
self.handle_response_data(resp.json(), language, creator_counts, filter_information)
File "C:\Users\Amogh\Desktop\TwitchCompilationCreator-2.0\src\ClipHandler.py", line 136, in handle_response_data
current_clip = Clip(**clip)
TypeError: init() got an unexpected keyword argument 'vod_offset'
then it stops working

Error compiling footage

`warning:root:No model for prediction available -> every clip is chosen as valid (ingame)
info:root:Adding new valid clip: . by FaZeSway
warning:root:No model for prediction available -> every clip is chosen as valid (ingame)
info:root:Adding new valid clip: matrix movement by NateHill
warning:root:No model for prediction available -> every clip is chosen as valid (ingame)
info:root:Adding new valid clip: what is a junk rif? by TheNicoleT
warning:root:No model for prediction available -> every clip is chosen as valid (ingame)
info:root:Adding new valid clip: TRIO CASH CUP NO BUILD😎🤙 | -> KOD: KUBX <- | !keydrop !org !ppv by Kubx
warning:root:No model for prediction available -> every clip is chosen as valid (ingame)
info:root:Adding new valid clip: $100,000 SAMSUNG ODYSSEY TOURNAMENT W/ DAKOTAZ | !tourney !giveaway by xChocoBars
info:root:Required length reached
info:root:Saving metadata.json
info:root:Loading metadata.json
info:root:Refreshing Metadata
info:root:Loading metadata_config.json
info:root:Getting amount of playlist items
warning:root:Status Code: 400, {'error': {'code': 400, 'message': 'API key not valid. Please pass a valid API key.', 'errors': [{'message': 'API key not valid. Please pass a valid API key.', 'domain': 'global', 'reason': 'badRequest'}], 'status': 'INVALID_ARGUMENT', 'details': [{'@type': 'type.googleapis.com/google.rpc.ErrorInfo', 'reason': 'API_KEY_INVALID', 'domain': 'googleapis.com', 'metadata': {'service': 'youtube.googleapis.com'}}]}}
warning:root:Check if you inserted a correct PlayListID in your metadata_config -> return playlist_size of 0
info:root:Saving metadata.json
info:root:Creating compilation from 13 clips
Traceback (most recent call last):
File "D:\Users\Connor\Desktop\TwitchBot.venv\lib\site-packages\moviepy\video\VideoClip.py", line 1137, in init
subprocess_call(cmd, logger=None)
File "D:\Users\Connor\Desktop\TwitchBot.venv\lib\site-packages\moviepy\tools.py", line 46, in subprocess_call
proc = sp.Popen(cmd, **popen_params)
File "C:\Users\Connor\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 966, in init
self._execute_child(args, executable, preexec_fn, close_fds,
File "C:\Users\Connor\AppData\Local\Programs\Python\Python310\lib\subprocess.py", line 1435, in _execute_child
hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] The system cannot find the file specified

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "D:\Users\Connor\Desktop\TwitchBot\main.py", line 26, in
vcc.create_compilation()
File "D:\Users\Connor\Desktop\TwitchBot\src\ClipCompilationCreator.py", line 27, in create_compilation
composite_clips = list(self.composite_clips(clips).values())
File "D:\Users\Connor\Desktop\TwitchBot\src\ClipCompilationCreator.py", line 70, in composite_clips
txts = self.generate_clip_text(self.metadata)
File "D:\Users\Connor\Desktop\TwitchBot\src\ClipCompilationCreator.py", line 87, in generate_clip_text
txt = TextClip(
File "D:\Users\Connor\Desktop\TwitchBot.venv\lib\site-packages\moviepy\video\VideoClip.py", line 1146, in init
raise IOError(error)
OSError: MoviePy Error: creation of None failed because of the following error:

[WinError 2] The system cannot find the file specified.

.This error can be due to the fact that ImageMagick is not installed on your computer, or (for Windows users) that you didn't specify the path to the ImageMagick binary in file conf.py, or that the path you specified is incorrect

(.venv) D:\Users\Connor\Desktop\TwitchBot>
`

Add features

Hello, I'm looking for someone to help me add 2 simple features to the program, I have very basic knowledge in Python and couldn't do it by myself,
1 - adding broadcaster name to the output rawclip after the clip number
2 - adding broadcaster channel line to the metadata.json file
Thanks in advance

Issur when running main.py

Hi, I have these errors when I run main.py. Can you help me ?

some texte here
...

info:root:Creating compilation from 2 clips
warning:root:No watermark found -> video will be created without watermark
Traceback (most recent call last):
  File "C:\Python38\lib\site-packages\moviepy\video\VideoClip.py", line 1137, in __init__
    subprocess_call(cmd, logger=None)
  File "C:\Python38\lib\site-packages\moviepy\tools.py", line 46, in subprocess_call
    proc = sp.Popen(cmd, **popen_params)
  File "C:\Python38\lib\subprocess.py", line 854, in __init__
    self._execute_child(args, executable, preexec_fn, close_fds,
  File "C:\Python38\lib\subprocess.py", line 1307, in _execute_child
    hp, ht, pid, tid = _winapi.CreateProcess(executable, args,
FileNotFoundError: [WinError 2] Le fichier spécifié est introuvable

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "F:\TwitchCompilationCreator-main\main.py", line 27, in <module>
    vcc.create_compilation()
  File "F:\TwitchCompilationCreator-main\src\ClipCompilationCreator.py", line 27, in create_compilation
    composite_clips = list(self.composite_clips(clips).values())
  File "F:\TwitchCompilationCreator-main\src\ClipCompilationCreator.py", line 70, in composite_clips
    txts = self.generate_clip_text(self.metadata)
  File "F:\TwitchCompilationCreator-main\src\ClipCompilationCreator.py", line 87, in generate_clip_text
    txt = TextClip(
  File "C:\Python38\lib\site-packages\moviepy\video\VideoClip.py", line 1146, in __init__
    raise IOError(error)
OSError: MoviePy Error: creation of None failed because of the following error:

[WinError 2] Le fichier spécifié est introuvable.

.This error can be due to the fact that ImageMagick is not installed on your computer, or (for Windows users) that you didn't specify the path to the ImageMagick binary in file conf.py, or that the path you specified is incorrect

import tensorflow as tf not found

(twitchcompilationcreator-py3.10) C:\Users\x\Downloads\TwitchCompilationCreator-main\TwitchCompilationCreator-main>poetry run python main.py Traceback (most recent call last): File "C:\Users\x\Downloads\TwitchCompilationCreator-main\TwitchCompilationCreator-main\main.py", line 1, in <module> from src.ClipHandler import ClipHandler File "C:\Users\x\Downloads\TwitchCompilationCreator-main\TwitchCompilationCreator-main\src\ClipHandler.py", line 8, in <module> import tensorflow as tf File "C:\Users\x\AppData\Local\pypoetry\Cache\virtualenvs\twitchcompilationcreator-OOcEXyJf-py3.10\lib\site-packages\tensorflow\__init__.py", line 37, in <module> from tensorflow.python.tools import module_util as _module_util ModuleNotFoundError: No module named 'tensorflow.python'

import tensorflow as tf not found I have reinstalled tensorflow upgraded pip force reinstalled. Installed after creating "poetry shell" within project folder
still can't get around this.

Runtime error when models cannot be pulled via LFS

I'm encountering a problem when cloning the Repository with overused LFS usage. While the program works with and without models, it crashes when the models are downloaded with a failed LFS pull. This is because git already creates the files without loading their content.
This issue acts as a reminder that we should investigate/talk about this problem.

Below the error message:

Traceback (most recent call last):
  File "/Users/christiancoenen/repos/Automation Idea/Twitch-Clip-Compilation-Creator/main.py", line 16, in <module>
    ch = ClipHandler(game, args.asset_path, args.output_path)
  File "/Users/christiancoenen/repos/Automation Idea/Twitch-Clip-Compilation-Creator/src/ClipHandler.py", line 37, in __init__
    self.model = tf.keras.models.load_model(model_file_path)
  File "/Users/christiancoenen/Library/Caches/pypoetry/virtualenvs/twitch-clip-compilation-creator-ZNWf-7Oc-py3.8/lib/python3.8/site-packages/tensorflow/python/keras/saving/save.py", line 211, in load_model
    loader_impl.parse_saved_model(filepath)
  File "/Users/christiancoenen/Library/Caches/pypoetry/virtualenvs/twitch-clip-compilation-creator-ZNWf-7Oc-py3.8/lib/python3.8/site-packages/tensorflow/python/saved_model/loader_impl.py", line 111, in parse_saved_model
    raise IOError("SavedModel file does not exist at: %s/{%s|%s}" %
OSError: SavedModel file does not exist at: assets/fortnite/game_detection.h5/{saved_model.pbtxt|saved_model.pb}

Module Not Found

C:\Users\Ramz\Downloads\TwitchCompilationCreator-main\TwitchCompilationCreator-main>poetry run python main.py
Traceback (most recent call last):
  File "C:\Users\Ramz\Downloads\TwitchCompilationCreator-main\TwitchCompilationCreator-main\main.py", line 1, in <module>
    from src.ClipHandler import ClipHandler
  File "C:\Users\Ramz\Downloads\TwitchCompilationCreator-main\TwitchCompilationCreator-main\src\ClipHandler.py", line 5, in <module>
    import numpy as np
ModuleNotFoundError: No module named 'numpy'

I've followed the guide and got this error appear. I have numpy already installed before starting the guide.

Poetry doesn't install all packages

`poetry install
Installing dependencies from lock file

Package operations: 5 installs, 0 updates, 0 removals

• Installing h5py (2.10.0): Failed

EnvCommandError

Command ['/root/.cache/pypoetry/virtualenvs/twitchcompilationcreator-1vuCogfD-py3.9/bin/pip', 'install', '--no-deps', 'file:///root/.cache/pypoetry/artifacts/67/73/11/59cd898ab55f65d9213500215b00e663dafb02beb2e48301f1ffc078ae/h5py-2.10.0.tar.gz'] errored with the following return code 1, and output:
Processing /root/.cache/pypoetry/artifacts/67/73/11/59cd898ab55f65d9213500215b00e663dafb02beb2e48301f1ffc078ae/h5py-2.10.0.tar.gz
Building wheels for collected packages: h5py
Building wheel for h5py (setup.py): started
Building wheel for h5py (setup.py): finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /root/.cache/pypoetry/virtualenvs/twitchcompilationcreator-1vuCogfD-py3.9/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-1j4ru1qt/setup.py'"'"'; file='"'"'/tmp/pip-req-build-1j4ru1qt/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' bdist_wheel -d /tmp/pip-wheel-2u4zdnys
cwd: /tmp/pip-req-build-1j4ru1qt/
Complete output (64 lines):
running bdist_wheel
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/h5py
copying h5py/h5py_warnings.py -> build/lib.linux-x86_64-3.9/h5py
copying h5py/init.py -> build/lib.linux-x86_64-3.9/h5py
copying h5py/highlevel.py -> build/lib.linux-x86_64-3.9/h5py
copying h5py/ipy_completer.py -> build/lib.linux-x86_64-3.9/h5py
copying h5py/version.py -> build/lib.linux-x86_64-3.9/h5py
creating build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/datatype.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/selections2.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/compat.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/dims.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/init.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/vds.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/dataset.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/base.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/attrs.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/files.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/filters.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/selections.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/group.py -> build/lib.linux-x86_64-3.9/h5py/_hl
creating build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_base.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_h5p.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_dims_dimensionproxy.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_filters.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_slicing.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_h5d_direct_chunk.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_datatype.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/common.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/init.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_attrs.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_attrs_data.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_h5pl.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_dataset_getitem.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_h5t.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_objects.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_file2.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_file_image.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_deprecation.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_attribute_create.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_dataset_swmr.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_file.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_group.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_h5.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_selections.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_completions.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_h5f.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_threads.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_dtype.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_dataset.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_dimension_scales.py -> build/lib.linux-x86_64-3.9/h5py/tests
creating build/lib.linux-x86_64-3.9/h5py/tests/test_vds
copying h5py/tests/test_vds/test_virtual_source.py -> build/lib.linux-x86_64-3.9/h5py/tests/test_vds
copying h5py/tests/test_vds/init.py -> build/lib.linux-x86_64-3.9/h5py/tests/test_vds
copying h5py/tests/test_vds/test_lowlevel_vds.py -> build/lib.linux-x86_64-3.9/h5py/tests/test_vds
copying h5py/tests/test_vds/test_highlevel_vds.py -> build/lib.linux-x86_64-3.9/h5py/tests/test_vds
running build_ext
Loading library to get version: libhdf5.so
error: libhdf5.so: cannot open shared object file: No such file or directory
----------------------------------------
ERROR: Failed building wheel for h5py
Running setup.py clean for h5py
Failed to build h5py
Installing collected packages: h5py
Running setup.py install for h5py: started
Running setup.py install for h5py: finished with status 'error'
ERROR: Command errored out with exit status 1:
command: /root/.cache/pypoetry/virtualenvs/twitchcompilationcreator-1vuCogfD-py3.9/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-1j4ru1qt/setup.py'"'"'; file='"'"'/tmp/pip-req-build-1j4ru1qt/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-x7f_xgav/install-record.txt --single-version-externally-managed --compile --install-headers /root/.cache/pypoetry/virtualenvs/twitchcompilationcreator-1vuCogfD-py3.9/include/site/python3.9/h5py
cwd: /tmp/pip-req-build-1j4ru1qt/
Complete output (64 lines):
running install
running build
running build_py
creating build
creating build/lib.linux-x86_64-3.9
creating build/lib.linux-x86_64-3.9/h5py
copying h5py/h5py_warnings.py -> build/lib.linux-x86_64-3.9/h5py
copying h5py/init.py -> build/lib.linux-x86_64-3.9/h5py
copying h5py/highlevel.py -> build/lib.linux-x86_64-3.9/h5py
copying h5py/ipy_completer.py -> build/lib.linux-x86_64-3.9/h5py
copying h5py/version.py -> build/lib.linux-x86_64-3.9/h5py
creating build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/datatype.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/selections2.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/compat.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/dims.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/init.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/vds.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/dataset.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/base.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/attrs.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/files.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/filters.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/selections.py -> build/lib.linux-x86_64-3.9/h5py/_hl
copying h5py/_hl/group.py -> build/lib.linux-x86_64-3.9/h5py/_hl
creating build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_base.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_h5p.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_dims_dimensionproxy.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_filters.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_slicing.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_h5d_direct_chunk.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_datatype.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/common.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/init.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_attrs.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_attrs_data.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_h5pl.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_dataset_getitem.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_h5t.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_objects.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_file2.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_file_image.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_deprecation.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_attribute_create.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_dataset_swmr.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_file.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_group.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_h5.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_selections.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_completions.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_h5f.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_threads.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_dtype.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_dataset.py -> build/lib.linux-x86_64-3.9/h5py/tests
copying h5py/tests/test_dimension_scales.py -> build/lib.linux-x86_64-3.9/h5py/tests
creating build/lib.linux-x86_64-3.9/h5py/tests/test_vds
copying h5py/tests/test_vds/test_virtual_source.py -> build/lib.linux-x86_64-3.9/h5py/tests/test_vds
copying h5py/tests/test_vds/init.py -> build/lib.linux-x86_64-3.9/h5py/tests/test_vds
copying h5py/tests/test_vds/test_lowlevel_vds.py -> build/lib.linux-x86_64-3.9/h5py/tests/test_vds
copying h5py/tests/test_vds/test_highlevel_vds.py -> build/lib.linux-x86_64-3.9/h5py/tests/test_vds
running build_ext
Loading library to get version: libhdf5.so
error: libhdf5.so: cannot open shared object file: No such file or directory
----------------------------------------
ERROR: Command errored out with exit status 1: /root/.cache/pypoetry/virtualenvs/twitchcompilationcreator-1vuCogfD-py3.9/bin/python -u -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-req-build-1j4ru1qt/setup.py'"'"'; file='"'"'/tmp/pip-req-build-1j4ru1qt/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(file) if os.path.exists(file) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, file, '"'"'exec'"'"'))' install --record /tmp/pip-record-x7f_xgav/install-record.txt --single-version-externally-managed --compile --install-headers /root/.cache/pypoetry/virtualenvs/twitchcompilationcreator-1vuCogfD-py3.9/include/site/python3.9/h5py Check the logs for full command output.

at ~/.poetry/lib/poetry/utils/env.py:1101 in run
1097│ output = subprocess.check_output(
1098│ cmd, stderr=subprocess.STDOUT, **kwargs
1099│ )
1100│ except CalledProcessError as e:
→ 1101│ raise EnvCommandError(e, input=input
)
1102│
1103│ return decode(output)
1104│
1105│ def execute(self, bin, *args, **kwargs):`

I've followed the guide and got this error appear after trying to poetry install
looks like it doesn't install h5py,jinja2,moviepy,streamlink,tensorflow
(reinstal doesn't work)

streamlink.exceptions.StreamError:

Hi, at some point the Bot gives me this Error:

info:root:Adding new valid clip: Clip zum Tot by MontanaBlack88
info:root:Status Code: 200 -> handling response data now
info:root:New pagination: eyJiIjpudWxsLCJhIjp7IkN1cnNvciI6Ik5EQXcifX0
Traceback (most recent call last):
File "/home/pablo/.cache/pypoetry/virtualenvs/twitchcompilationcreator-_qx3GjyT-py3.8/lib/python3.8/site-packages/streamlink/plugin/api/http_session.py", line 160, in request
res.raise_for_status()
File "/home/pablo/.cache/pypoetry/virtualenvs/twitchcompilationcreator-_qx3GjyT-py3.8/lib/python3.8/site-packages/requests/models.py", line 943, in raise_for_status
raise HTTPError(http_error_msg, response=self)
requests.exceptions.HTTPError: 404 Client Error: for url: https://production.assets.clips.twitchcdn.net/AT-cm%7ClhUD7Y13uOHAD7xBG7Azew.mp4?sig=03c8ef4078b909a526520055f3aea26a813f2e24&token=%7B%22authorization%22%3A%7B%22forbidden%22%3Atrue%2C%22reason%22%3A%22GEOBLOCKED%22%7D%2C%22clip_uri%22%3A%22https%3A%2F%2Fproduction.assets.clips.twitchcdn.net%2FAT-cm%257ClhUD7Y13uOHAD7xBG7Azew.mp4%22%2C%22device_id%22%3Anull%2C%22expires%22%3A1634224325%2C%22user_id%22%3A%22%22%2C%22version%22%3A2%7D

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "main.py", line 17, in
ch.get_clips(
File "/home/pablo/Schreibtisch/Twitch/TwitchCompilationCreator/src/ClipHandler.py", line 46, in get_clips
self.get_game_clips(utils.get_headers(), timespan, language, kwargs)
File "/home/pablo/Schreibtisch/Twitch/TwitchCompilationCreator/src/ClipHandler.py", line 78, in get_game_clips
self.handle_response_data(resp.json(), language, creator_counts, filter_information)
File "/home/pablo/Schreibtisch/Twitch/TwitchCompilationCreator/src/ClipHandler.py", line 123, in handle_response_data
clip_path = self.download_clip(clip)
File "/home/pablo/Schreibtisch/Twitch/TwitchCompilationCreator/src/ClipHandler.py", line 155, in download_clip
with open(output_file, "wb") as f, stream.open() as fd:
File "/home/pablo/.cache/pypoetry/virtualenvs/twitchcompilationcreator-_qx3GjyT-py3.8/lib/python3.8/site-packages/streamlink/stream/http.py", line 70, in open
res = self.session.http.request(method=method,
File "/home/pablo/.cache/pypoetry/virtualenvs/twitchcompilationcreator-_qx3GjyT-py3.8/lib/python3.8/site-packages/streamlink/plugin/api/http_session.py", line 168, in request
raise err
streamlink.exceptions.StreamError: Unable to open URL: https://production.assets.clips.twitchcdn.net/AT-cm%7ClhUD7Y13uOHAD7xBG7Azew.mp4?sig=03c8ef4078b909a526520055f3aea26a813f2e24&token=%7B%22authorization%22%3A%7B%22forbidden%22%3Atrue%2C%22reason%22%3A%22GEOBLOCKED%22%7D%2C%22clip_uri%22%3A%22https%3A%2F%2Fproduction.assets.clips.twitchcdn.net%2FAT-cm%257ClhUD7Y13uOHAD7xBG7Azew.mp4%22%2C%22device_id%22%3Anull%2C%22expires%22%3A1634224325%2C%22user_id%22%3A%22%22%2C%22version%22%3A2%7D (404 Client Error: for url: https://production.assets.clips.twitchcdn.net/AT-cm%7ClhUD7Y13uOHAD7xBG7Azew.mp4?sig=03c8ef4078b909a526520055f3aea26a813f2e24&token=%7B%22authorization%22%3A%7B%22forbidden%22%3Atrue%2C%22reason%22%3A%22GEOBLOCKED%22%7D%2C%22clip_uri%22%3A%22https%3A%2F%2Fproduction.assets.clips.twitchcdn.net%2FAT-cm%257ClhUD7Y13uOHAD7xBG7Azew.mp4%22%2C%22device_id%22%3Anull%2C%22expires%22%3A1634224325%2C%22user_id%22%3A%22%22%2C%22version%22%3A2%7D)

Can some one Help me out with this?

Greetings

Poetry

I can't figure this out at all just looking for some help

**Error
**
`C:\Users\rusty\Downloads\TwitchCompilationCreator-2.0>poetry install

EnvCommandError

Command C:\Users\rusty\AppData\Local\pypoetry\Cache\virtualenvs\twitchcompilationcreator-ofLkCIrp-py3.8\Scripts\python.exe -W ignore - errored with the following return code 1, and output:
The system cannot find the path specified.
input was : import sys

if hasattr(sys, "real_prefix"):
print(sys.real_prefix)
elif hasattr(sys, "base_prefix"):
print(sys.base_prefix)
else:
print(sys.prefix)

at ~.poetry\lib\poetry\utils\env.py:1195 in run
1191│ output = subprocess.check_output(
1192│ cmd, stderr=subprocess.STDOUT, **kwargs
1193│ )
1194│ except CalledProcessError as e:
→ 1195│ raise EnvCommandError(e, input=input
)
1196│
1197│ return decode(output)
1198│
1199│ def execute(self, bin, *args, **kwargs):

`C:\Users\rusty\Downloads\TwitchCompilationCreator-2.0>``

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.