Showing posts with label tips. Show all posts
Showing posts with label tips. Show all posts

Error downloading audio: get_throttling_function_name: could not find match for multiple

 In the past I had posted this https://alashazam.blogspot.com/2023/05/python-program-to-download-music.html explaining how to download video using python library pytube

If you are still using this program, you will notice that it is recently not functional anymore 

As of end of June 2023, this program will crash with this error:

Error downloading audio: get_throttling_function_name: could not find match for multiple

and if you are investigating further you will also discover this error

pytube.exceptions.RegexMatchError: get_throttling_function_name: could not find match for multiple
During handling of the above exception, another exception occurred:

To fix the error - you will have to edit the file /lib/python3.10/site-packages/pytube/cipher.py
on line +287 and remove the ; character

so the new file will be like this


Once that change is made the pytube library will work again.

How to get a prompt from a png file

It is sometime frustrating to see a beautiful AI generated pictures on reddit for example, and the user did not post the prompt or the detail on the model used.

With the help of this website (pngchunk.com)

you will be able to see the prompt used and all AI details (assuming the file has been made with Stable Diffusion)



makepose.com

Useful to put characters into a situation or a specific movement

https://makepose.com/ 

Using the website above, there is a 2D or 3D model

everything is controlled by the mouse, joint movement, zoom in and out (scrolling button) and rotation

it is possible to add more character, and even to generate the pose into a pseudo stable diffusion module.

  • prompt: str = Form(""), num_samples: int = Form(1), image_resolution: int = Form(512),
  • low_threshold: int = Form(100), high_threshold: int = Form(200), ddim_steps: int = Form(20),
  • scale: float = Form(9.0), seed: Optional[int] = Form(None), eta: float = Form(0.0),
  • a_prompt: str = Form("best quality, extremely detailed"), n_prompt: str = Form("longbody, lowres, bad anatomy, bad hands, missing fingers, extra digit, fewer digits, cropped, worst quality, low quality"), detect_resolution: int = Form(512),

Other special features:

  • Scrolling and zooming
  • Download button 
  • Dragging characters around 
  • up to 4 characters
  • Double clicking a limb to increase limb size


This is the perfect complement to use Controlnet via  Stable Diffusion


Why AI art struggles with hands


I mean to be fair many traditional artists are struggling to draw hands



In conclusion AI is drawing a lot of stuffs wrong, anatomically muscles, teeth, animals etc ... AI is making many weird exaggeration,wrong moves, impossible movement, but in most cases we don't notice them because we are not really putting attention to it.

But we notice hands because we are used to be careful about them.
An arm bending the wrong way would also be noticeable, a leg that does not end, or lacking a foot will also be noticed, even by non artists ; because as human we have evolved a sense for noticing potential dangers, or to help our fellow humans that were injured, or maimed during battles...

Because let's be honest, if an artist spending most of his life drawing the human anatomy on sketchbooks, is seeing AI artwork, he would be appalled 

When an AI is drawing an Alien, he could generated as many eyes, or teeth, or nose ; because we have to way of seeing that it is wrong, same goes with a tiger's face, or a dog's anatomy, we are not too picky about it.


Linux script for youtube-dl


 #!/bin/bash
function usage
{
    echo "usage: yl [youtube-link]"
}
if [ "$1" != "" ]; then
 echo "Downloading $1"
 cd ~/Music
 echo "/usr/local/bin/youtube-dl --extract-audio --audio-quality 128K  --audio-format mp3 -l $1"
 /usr/local/bin/youtube-dl --extract-audio --audio-quality 128K  --audio-format mp3 -l $1
 echo "Done!"
fi



Downloading songs as mp3

Fetching mp3 from youtube video on Ubuntu Linux

the selected tool is 'youtube-dl'

from the terminal prompt write:

$pip install youtube-dl

but then you get this error (because we are March 2023 and things are broken)

ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

for the long version of this error:

ERROR: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.

    'uploader_id': self._search_regex(r'/(?:channel|user)/([^/?&#]+)', owner_profile_url, 'uploader id') if owner_profile_url else None,

  File "/home/_dl/extractor/common.py", line 1012, in _search_regex

    raise RegexNotFoundError('Unable to extract %s' % _name)

youtube_dl.utils.RegexNotFoundError: Unable to extract uploader id; please report this issue on https://yt-dl.org/bug . Make sure you are using the latest version; see  https://yt-dl.org/update  on how to update. Be sure to call youtube-dl with the --verbose flag and include its complete output.


To fix this error you will have to type this:

$ pip uninstall youtube-dl

then type this:
$pip install git+https://github.com/ytdl-org/youtube-dl.git@master#egg=youtube_dl

but that means you need to install git
$ apt install git 
will do

while you're installing new package don't forget to get ffmpeg as well
$ apt install ffmpeg

Now you're ready to get the song you want




Tumblr backup solution

How to backup your tumblr

As of today there are several solutions provided to backup a tumblr account - but either you need to sign up, pay and then download an application, or install browser add-ons and then you will have a lot of html files (e.g:  http://boutofcontext.com/tumblr_backup.php) - and it isn't really dynamic - you will have to backup it up from times to times, but there is a better way ...

A smart way to backup your tumblr with soup.io

In a previous post I was mentioning soup.io as a micro-blogging platform - there is actually a way to mirror your tumblr into a soup.io - and here's how :


Create a soup.io account - then go into Automatic imports and put your tumblr name.
Then press add and wait - this could take a long time, so don't close the tab, or interrupt the process, otherwise you will have duplicates post all over the place.

More than backup a synchronization

It just works!
Check for yourself : 
Source for the article : http://crumbler.tumblr.com/post/50828785541/how-to-backup-your-tumblr-blog

2021 Advices

Women are the most prejudiced group of people that ever lived because women have never been afforded the divine right of God, and they have no ally in heaven.

If people just learn to be selfless enough to simply meditate in silence for 20 minutes a day and let the light work on them the entire world would change in an instant. 

People need to break out of the revolving wheel of pleasure seeking that never leads to happiness and increases suffering. 

It's time for all of us to start learning to love unconditionally, not just because we get something in return. 

Otherwise we're just ignorant... we are just unconscious beasts.

Related Posts with Thumbnails