Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

requests.exceptions.MissingSchema: Invalid URL '': No scheme supplied. Perhaps you meant http://? #217

Open
hamzaaitbrik opened this issue Oct 24, 2022 · 10 comments

Comments

@hamzaaitbrik
Copy link

hamzaaitbrik commented Oct 24, 2022

this error occurs when the bot is searching for a post to re-post. any solutions to this? I should also add up that I'm running the bot on Linux shell.

@toukcrew
Copy link

toukcrew commented Nov 8, 2022

Hey did you find a solution? Having same error :/

@0x17d9ef78
Copy link

Same here

@hamzaaitbrik
Copy link
Author

Hey did you find a solution? Having same error :/

Indeed I have developed a solution to run the script while I'm away. But, it's just a "fix" that reruns the script whenever it stops.

@0x17d9ef78
Copy link

Hey did you find a solution? Having same error :/

Indeed I have developed a solution to run the script while I'm away. But, it's just a "fix" that reruns the script whenever it stops.

Can you share? Usually using forever for node, what are you using in this case?

@VespidEmperor
Copy link

Hey did you find a solution? Having same error :/

Indeed I have developed a solution to run the script while I'm away. But, it's just a "fix" that reruns the script whenever it stops.

Mine crashes frequently and I cannot restart every 5 minutes, would you mind sharing the script that reruns whenever it crashes? Would be muchly appreciated!

@hamzaaitbrik
Copy link
Author

Sorry for the late reply. Here's the code I used to run the script infinitely:

import os
while(os.system('sh run_linux.sh') == 0):
    os.system('sh run_linux.sh')

That's it. Note that you're gonna need super user priveleges in order to run run_linux.sh each time, I counter this by running the python script I attached in a Terminal window that has sudo su command already executed.
@VespidEmperor @0x17d9ef78

@VespidEmperor
Copy link

I do not run on Linux. I am a Windows normie sorry. Is there a way to turn into a python script or a bat file that can just run on my PC then close when done?

@hamzaaitbrik
Copy link
Author

@VespidEmperor I think the script I provided will work for Windows as it does for Linux, simply because Python works on Windows too. What might cause you some trouble is super user privileges, but I really doubt you'll find any trouble since it's Windows... Just replace the sh run_linux.sh with the command you use for Windows. Make sure you open PowerShell/CMD as administrator.

@L-mbda
Copy link

L-mbda commented Apr 10, 2023

My bandaid solution was to just replace the post_actions.py segment where requests is being used and then add https:// at the start before the variable for the rest of the URL.

@hamzaaitbrik
Copy link
Author

@de-y that's an interesting fix. Mine is what a bandaid looks like; it just reruns the script whenever it fails...endlessly. Thanks for your contribution.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants