i can not import the twitterscraper library - twitter

I pip installed the twitterscraper library. then i try to import it and get this error:
ConnectionError: HTTPSConnectionPool(host='free-proxy-list.net', port=443): Max retries exceeded with url: / (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x00000000069543A0>: Failed to establish a new connection: [Errno 11004] getaddrinfo failed'))
i turn on the vpn and this time i get this error :
ValueError: check_hostname requires server_hostname
what am i supposed to do ? thanks.

Related

requests.exceptions.ConnectionError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443):

I got this error while running below code, please helps!
stanza.Pipeline(lang='id', processors='tokenize', use_gpu=True)
full error:
requests.exceptions.ConnectionError: HTTPSConnectionPool(host='raw.githubusercontent.com', port=443): Max retries exceeded with url: /stanfordnlp/stanza-resources/main/resources_1.4.0.json (Caused by NewConnectionError('<urllib3.connection.HTTPSConnection object at 0x000001F6332F9580>: Failed to establish a new connection: [WinError 10061] No connection could be made because the target machine actively refused it'))
Thanks
Please help me solve this!!

Jenkins connection refused trying to use Appium

I want to execute the tests that work fine on my local ide, on the corporate jenkins now.
Im getting an "Errno 111" connection refused message at this part:
def driver_setup():
driver = webdriver.Remote( "http://localhost:4723/wd/hub",
desired_capabilities= capabilities)
Jenkins is giving me this log
urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='127.0.1.1', port=4723): Max retries exceeded with url: /wd/hub/session (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f16c2f921c0>: Failed to establish a new connection: [Errno 111] Connection refused'))

I'm not able to install opencv in pycharm?

I have downloaded opencv through cmd using pip install opencv-python. But when I run simple read write program in pycharm it couldn't load import cv2 command when I search then, I came to know that pycharm have some other way to install opencv. I did it setting->project->project interperter then I search for
opencv-python but it gives me this error during installation:
Collecting opencv-python
Could not fetch URL https://pypi.org/simple/opencv-python/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/opencv-python/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available.")) - skipping
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
Retrying (Retry(total=4, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/opencv-python/
Retrying (Retry(total=3, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/opencv-python/
Retrying (Retry(total=2, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/opencv-python/
Retrying (Retry(total=1, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/opencv-python/
Retrying (Retry(total=0, connect=None, read=None, redirect=None, status=None)) after connection broken by 'SSLError("Can't connect to HTTPS URL because the SSL module is not available.")': /simple/opencv-python/
Could not find a version that satisfies the requirement opencv-python (from versions: )
No matching distribution found for opencv-python
pip is configured with locations that require TLS/SSL, however the ssl module in Python is not available.
I have the latest version of python and pip but though I am getting this error could anyone help me, please.
It's most likely that you installed opencv in the base conda environment and not the environment you activated as interpreter or that you installed it in the environment you created and have the base env activated:
Try the following set of steps:
conda create -n envname python
conda activate envname
pip install opencv-python
Go to pycharm and add the envname environment to pycharm interpreters, activate it and then run the code.
Your initial error is:
Could not fetch URL https://pypi.org/simple/pip/: There was a problem confirming the ssl certificate: HTTPSConnectionPool(host='pypi.org', port=443): Max retries exceeded with url: /simple/pip/ (Caused by SSLError("Can't connect to HTTPS URL because the SSL module is not available."))
If you are Windows user, set following paths to System's PATH environment variable:
If using Anaconda:
<system_path>\Anaconda3
<system_path>\Anaconda3\scripts
<system_path>\Anaconda3\Library\bin
If only Python is installed on your system then(I am assuming Python 3.6 is installed in your system):
<system_path_where_python_is_installed>\Python36
<system_path_where_python_is_installed>\Python36\Scripts
<system_path_where_python_is_installed>\Python36\Library\bin
And then try to install opencv via PyCharm.
Hope this solves your problem.

Yuk- Chan Docker image in GitLab

I was using the Docker image of Yuki-Chan in GitLab but i'm having some troubles.
I get recurrent this error:
requests.exceptions.ConnectionError: HTTPConnectionPool(host='https', port=80): Max retries exceeded with url: //target (Caused by NewConnectionError('<urllib3.connection.HTTPConnection object at 0x7f10e72d7190>: Failed to establish a new connection: [Errno -2] Name or service not known',))
do you any idea about the cause?
Thank you very much!

Able to get pictures from video stream of an ip webcam in local but fails in cloud function , google compute engine VM instance

I have installed IP webcam in my android and video streaming. If I open the url, it's showing the live video in my web browser. I am able to successfully get pictures from a live video stream using python in my local machine. But the same code doesn't work in google compute engine VM instance and via cloud function
I tried implementing few solutions posted in SO, but none of them worked.
import requests
import numpy as np
import cv2
import os
path_output_dir = 'path-folder'
count = 6
img_res = requests.get("http://ipaddress:8080/shot.jpg")
img_arr = np.array(bytearray(img_res.content), dtype = np.uint8)
img = cv2.imdecode(img_arr,-1)
cv2.imwrite(os.path.join(path_output_dir, '%d.jpeg') % count, img)
Error message in cloud function:
TimeoutError: [Errno 110] Connection timed out During handling of the above exception, another exception occurred: Traceback (most recent call last): File "/env/local/lib/python3.7/site-packages/urllib3/connectionpool.py",
urllib3.exceptions.NewConnectionError: : Failed to establish a new connection: [Errno 110] Connection timed out During handling of the above exception, another exception occurred: Traceback (most recent call last):
ResponseError(cause)) urllib3.exceptions.MaxRetryError: HTTPConnectionPool(host='192.168.0.24', port=8080): Max retries exceeded with url: /shot.jpg (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 110] Connection timed out')) requests.exceptions.ConnectionError: HTTPConnectionPool(host='192.168.0.24', port=8080): Max retries exceeded with url: /shot.jpg (Caused by NewConnectionError(': Failed to establish a new connection: [Errno 110] Connection timed out'))
192.168.0.24 is an IP address in your local network. It is not visible from the outside of your local network.
You might try Port Forwarding in your router (here is the example for Linksys), so cloud instance can see your cam via your public IP.

Resources