-
Notifications
You must be signed in to change notification settings - Fork 15
Description
Hi, I attempt to run search_clip_images.py either in your docker container or out and I get the same error like nothing is going into image_url.txt file:
python3 search_clip_images.py
"data/text_prompts.txt"
"data/image_urls.txt"
-n 5000
-m 10000
--max_workers 2
--append
Found the following 2 text prompts in data/text_prompts.txt
['Drone', 'Helicopter']
Querying images with the following prompts...
Drone
Helicopter
Traceback (most recent call last):
File "/home/user1/ariel/fed_learn/clip-distillation/search_clip_images.py", line 256, in
urls = asyncio.run(
File "/usr/lib/python3.10/asyncio/runners.py", line 44, in run
return loop.run_until_complete(main)
File "/usr/lib/python3.10/asyncio/base_events.py", line 649, in run_until_complete
return future.result()
File "/home/user1/ariel/fed_learn/clip-distillation/search_clip_images.py", line 118, in clip_search_images_by_multi_text
results = await asyncio.gather(*coros)
File "/home/user1/ariel/fed_learn/clip-distillation/search_clip_images.py", line 96, in safe_coro
return await coro
File "/home/user1/ariel/fed_learn/clip-distillation/search_clip_images.py", line 71, in clip_search_images_by_text
item['url'] for item in response.json() if 'url' in item
File "/usr/lib/python3/dist-packages/requests/models.py", line 900, in json
return complexjson.loads(self.text, **kwargs)
File "/usr/lib/python3.10/json/init.py", line 346, in loads
return _default_decoder.decode(s)
File "/usr/lib/python3.10/json/decoder.py", line 337, in decode
obj, end = self.raw_decode(s, idx=_w(s, 0).end())
File "/usr/lib/python3.10/json/decoder.py", line 355, in raw_decode
raise JSONDecodeError("Expecting value", s, err.value) from None
json.decoder.JSONDecodeError: Expecting value: line 1 column 1 (char 0)
FYI, debug raised the following:
The "502 Bad Gateway" error indicates a communication issue between two servers acting as gateways or proxies to fulfill a request. It doesn't specify a problem with your device or internet connection, but rather a fault within the servers involved.
Here's a breakdown of the key points:
Your request reached the first server (nginx) successfully.
Nginx forwarded the request to another upstream server to complete it.
The upstream server failed to respond correctly, causing nginx to return the 502 error.
Possible causes for this error:
Upstream Server Down: The upstream server might be unavailable or experiencing issues.
Overloaded Upstream Server: The upstream server might be overloaded with requests and unable to handle more.
Network Problems: There might be network connectivity issues between nginx and the upstream server.
Misconfiguration: Nginx or the upstream server might be misconfigured.