0

I built an app using KIVY. I am using an active URL and my connection is active. But it shows urlerror [errno - 7] Error in image.

I am using urllib.request to fetch an image. App is not crashing.

Application requirements are given below

sqlite3, python3, kivy, urllib3, httplib2

Permissions provided in the app are given below

android.permissions = INTERNET, ACCESS_NETWORK_STATE

Here is the code snippet to retrieve URL

urllib.request.urlretrieve("https://images.all-free-download.com/images/graphicthumb/img_9774_517863.jpg", "a.jpg")
4
  • Error as shown in logcat. I python : socket.gaierror: [Errno 7] No address associated with hostname I python : urllib.error.URLError: <urlopen error [Errno 7] No address associated with hostname>
    – Arunav
    Dec 2, 2019 at 19:03
  • can you update your manifest file in the question , please check internet permission is there
    – Jacks
    Dec 2, 2019 at 21:27
  • @Jacks, the manifest file is not there, I just had buildozer spec file, where can i get it. Do I have to create a manifest file.
    – Arunav
    Dec 3, 2019 at 3:52
  • @jacks It worked for me I had to use http.. Certificate issue
    – Arunav
    Dec 3, 2019 at 19:24

2 Answers 2

0

The issue was actually not permission but "https" Certificate I simply used http Also including ssl certificate would work

0

You also need this from this other post Error in pytube <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>

\# Solved in \
\# add\
import ssl
ssl._create_default_https_context = ssl._create_stdlib_context
1
  • While this link may answer the question, it is better to include the essential parts of the answer here and provide the link for reference. Link-only answers can become invalid if the linked page changes. - From Review
    – journpy
    Nov 26 at 6:21

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.