LilySurfaceScraper icon indicating copy to clipboard operation
LilySurfaceScraper copied to clipboard

Wouldn't import textures... Then my blender stopped opening.

Open Kaylum-Moir opened this issue 4 years ago • 7 comments

Hi, I installed the addon, so I went to CC0 Textures and tried to import this: https://cc0textures.com/view?id=Metal032

It didn't work and threw up an error message (which I am no longer able to capture).

I tried restarting blender in the off-chance it would help but now I can't open blender at all, it just says "No system-wide installation of lxml found. Falling back to local version." and stays on a grey screen. I installed lxml and the error still persists. Does anyone know a fix?

Kaylum-Moir avatar Nov 16 '20 16:11 Kaylum-Moir

It is weird that it freezes your Blender startup. You can hard delete the add-on by removing it from C:\Users\...\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons if you're on Windows or something equivalent on other OSes. Are you using a mac?

eliemichel avatar Nov 18 '20 18:11 eliemichel

It is weird that it freezes your Blender startup. You can hard delete the add-on by removing it from C:\Users\...\AppData\Roaming\Blender Foundation\Blender\2.90\scripts\addons if you're on Windows or something equivalent on other OSes. Are you using a mac?

No, I'm on Windows 10, with the latest blender version

Kaylum-Moir avatar Nov 18 '20 23:11 Kaylum-Moir

Similar behaviour here:

  • file saved

  • LilySurfaceScraper preferences set to save to specific folder (in desktop)

  • object selected

  • copy url to LilySurfaceScraper: https://cc0textures.com/view?id=Metal032

  • option to Select Variant appears: choose 1k jpg (or any)

  • Blender freezes and needs to be killed Using scraper 'Cc0texturesScraper' Downloading https://cdn3.struffelproductions.com/file/CC0-Textures/download/Metal032_qr6wojiu/Metal032_1K-JPG.zip...

  • inspecting the folders, Lily created the cc0textures folder, and the material folders, but without files.

  • looks like it is not able to download the texture files.

I tried with "Auto Run Python Scripts" ON and OFF, same behaviour

any advice?

v1.7.1 - RC1, v1.6.2, v1.5.1 / blender 2.92 / ubuntu 20.4 fresh install /

Python: Traceback (most recent call last):
  File "/home/uuser/.config/blender/2.92/scripts/addons/LilySurfaceScraper/frontend.py", line 173, in execute
    data.selectVariant(int(self.variant))
  File "/home/uuser/.config/blender/2.92/scripts/addons/LilySurfaceScraper/ScrapedData.py", line 70, in selectVariant
    if not self._scraper.fetchVariant(variant_index, self):
  File "/home/uuser/.config/blender/2.92/scripts/addons/LilySurfaceScraper/Scrapers/Cc0texturesScraper.py", line 81, in fetchVariant
    zip_path = self.fetchZip(zip_url, material_data.name, "textures.zip")
  File "/home/uuser/.config/blender/2.92/scripts/addons/LilySurfaceScraper/Scrapers/AbstractScraper.py", line 153, in fetchZip
    r = requests.get(url, stream=True, headers=headers)
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/urllib3/connectionpool.py", line 381, in _make_request
    self._validate_conn(conn)
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/urllib3/connectionpool.py", line 976, in _validate_conn
    conn.connect()
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/urllib3/connection.py", line 308, in connect
    conn = self._new_conn()
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
KeyboardInterrupt

location: <unknown location>:-1

cunicode avatar May 08 '21 16:05 cunicode

Do you have the same issue when running the following from Blender's Python console.

import requests
requests.get("https://cdn3.struffelproductions.com/file/CC0-Textures/download/Metal032_qr6wojiu/Metal032_1K-JPG.zip", stream=True, headers={"User-Agent":"Mozilla/5.0"})

eliemichel avatar May 10 '21 20:05 eliemichel

same results: Blender freeze

Traceback (most recent call last):
  File "/Text", line 2, in <module>
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/requests/api.py", line 76, in get
    return request('get', url, params=params, **kwargs)
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/requests/api.py", line 61, in request
    return session.request(method=method, url=url, **kwargs)
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/requests/sessions.py", line 530, in request
    resp = self.send(prep, **send_kwargs)
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/requests/sessions.py", line 643, in send
    r = adapter.send(request, **kwargs)
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/requests/adapters.py", line 449, in send
    timeout=timeout
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/urllib3/connectionpool.py", line 677, in urlopen
    chunked=chunked,
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/urllib3/connectionpool.py", line 381, in _make_request
    self._validate_conn(conn)
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/urllib3/connectionpool.py", line 976, in _validate_conn
    conn.connect()
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/urllib3/connection.py", line 308, in connect
    conn = self._new_conn()
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/urllib3/connection.py", line 160, in _new_conn
    (self._dns_host, self.port), self.timeout, **extra_kw
  File "/snap/blender/111/2.92/python/lib/python3.7/site-packages/urllib3/util/connection.py", line 74, in create_connection
    sock.connect(sa)
KeyboardInterrupt
Error: Python script failed, check the message in the system console

cunicode avatar May 10 '21 20:05 cunicode

temporarily solved here the findings, in case is useful for debugging or other cases:

problem: using Blender behind a OpenVPN connection via UDP (around 20Mbps) seems to not be enough for requests to handle the downloading

solution A: disable VPN = LilySurface works as expected and downloads the materials

cunicode avatar May 11 '21 09:05 cunicode

Ok, thanks for the feedback, this is a good workaround to remember about, I've just added it to the readme. The problem is from Python's requests side actually, it's not even Blender's fault. Another workaround could be to force your VPN into using IPv4 maybe.

eliemichel avatar May 11 '21 12:05 eliemichel