Giter Site home page Giter Site logo

Comments (12)

chrislemke avatar chrislemke commented on July 28, 2024

Hey @EugeneTarasenko!
Thanks for the detailed information. I will investigate the issue and come back to you. Just a short question. Which Workflow version you are using?

from chatfred.

EugeneTarasenko avatar EugeneTarasenko commented on July 28, 2024

Hey @EugeneTarasenko! Thanks for the detailed information. I will investigate the issue and come back to you. Just a short question. Which Workflow version you are using?

@chrislemke , 1.2.2. The latest beta version 1.3 doesn't work as well.

from chatfred.

chrislemke avatar chrislemke commented on July 28, 2024

I found this. Maybe

pip install --upgrade certifi

fixes it?

from chatfred.

EugeneTarasenko avatar EugeneTarasenko commented on July 28, 2024

@chrislemke
Unfortunately, no.


[21:23:51.841] ChatFred[Keyword] Passing output 'a fast red car' to Run Script
[21:23:59.814] ERROR: ChatFred[Run Script] Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1454, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 512, in wrap_socket
    return self.sslsocket_class._create(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1070, in _create
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1341, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/eugen/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.AEE17DC6-6D41-4E92-9EA8-1DE651F111CF/src/image_generation.py", line 68, in make_request
    urllib.request.urlretrieve(response["data"][0]["url"], file_path)  # nosec
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 241, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/eugen/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.AEE17DC6-6D41-4E92-9EA8-1DE651F111CF/src/image_generation.py", line 85, in <module>
    __response = make_request(get_query(), __size)
  File "/Users/eugen/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.AEE17DC6-6D41-4E92-9EA8-1DE651F111CF/src/image_generation.py", line 75, in make_request
    error_message=exception._message,  # type: ignore  # pylint: disable=protected-access
AttributeError: 'URLError' object has no attribute '_message'
[21:23:59.826] ChatFred[Run Script] Processing complete
[21:23:59.827] ChatFred[Run Script] Passing output '' to Conditional
[21:23:59.828] ChatFred[Conditional] Processing complete
[21:23:59.829] ChatFred[Conditional] Passing output '' to Large Type

from chatfred.

chrislemke avatar chrislemke commented on July 28, 2024

Maybe it is connected to your Python installation. You could try installing it using homebrew.

First, install homebrew:

/bin/bash -c "$(curl -fsSL https://raw.githubusercontent.com/Homebrew/install/HEAD/install.sh)"

Then install Python 3.10

brew install [email protected]

Not sure if that helps. But maybe it is worth a try.

from chatfred.

EugeneTarasenko avatar EugeneTarasenko commented on July 28, 2024

@chrislemke no luck.
Homebrew version: 4.0.6

[22:13:30.409] ChatFred[Keyword] Passing output 'a picture of a red and blue bird' to Run Script
[22:13:36.679] ERROR: ChatFred[Run Script] Traceback (most recent call last):
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1348, in do_open
    h.request(req.get_method(), req.selector, req.data, headers,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1282, in request
    self._send_request(method, url, body, headers, encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1328, in _send_request
    self.endheaders(body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1277, in endheaders
    self._send_output(message_body, encode_chunked=encode_chunked)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1037, in _send_output
    self.send(msg)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 975, in send
    self.connect()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/http/client.py", line 1454, in connect
    self.sock = self._context.wrap_socket(self.sock,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 512, in wrap_socket
    return self.sslsocket_class._create(
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1070, in _create
    self.do_handshake()
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/ssl.py", line 1341, in do_handshake
    self._sslobj.do_handshake()
ssl.SSLCertVerificationError: [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/eugen/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.AEE17DC6-6D41-4E92-9EA8-1DE651F111CF/src/image_generation.py", line 68, in make_request
    urllib.request.urlretrieve(response["data"][0]["url"], file_path)  # nosec
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 241, in urlretrieve
    with contextlib.closing(urlopen(url, data)) as fp:
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 216, in urlopen
    return opener.open(url, data, timeout)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 519, in open
    response = self._open(req, data)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 536, in _open
    result = self._call_chain(self.handle_open, protocol, protocol +
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 496, in _call_chain
    result = func(*args)
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1391, in https_open
    return self.do_open(http.client.HTTPSConnection, req,
  File "/Library/Frameworks/Python.framework/Versions/3.10/lib/python3.10/urllib/request.py", line 1351, in do_open
    raise URLError(err)
urllib.error.URLError: <urlopen error [SSL: CERTIFICATE_VERIFY_FAILED] certificate verify failed: unable to get local issuer certificate (_ssl.c:997)>

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
  File "/Users/eugen/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.AEE17DC6-6D41-4E92-9EA8-1DE651F111CF/src/image_generation.py", line 85, in <module>
    __response = make_request(get_query(), __size)
  File "/Users/eugen/Library/Application Support/Alfred/Alfred.alfredpreferences/workflows/user.workflow.AEE17DC6-6D41-4E92-9EA8-1DE651F111CF/src/image_generation.py", line 75, in make_request
    error_message=exception._message,  # type: ignore  # pylint: disable=protected-access
AttributeError: 'URLError' object has no attribute '_message'
[22:13:36.683] ChatFred[Run Script] Processing complete
[22:13:36.697] ChatFred[Run Script] Passing output '' to Conditional
[22:13:36.698] ChatFred[Conditional] Processing complete
[22:13:36.699] ChatFred[Conditional] Passing output '' to Large Type

from chatfred.

chrislemke avatar chrislemke commented on July 28, 2024

Looks like you are still using the old Python installation. For this to work, you need to tell MacOS which Python version it should use. Please check out the following link: https://stackoverflow.com/questions/5157678/how-do-i-use-brew-installed-python-as-the-default-python

from chatfred.

EugeneTarasenko avatar EugeneTarasenko commented on July 28, 2024

@chrislemke No luck.
I might not be skillful enough to figure out how to manage python versions installed on my mac.
For some reason, I can't even generate an image directly on the dall-e website. I get an error instead there:

Screen Shot 2023-03-18 at 22 52 21

Anyway, most likely the problem is on my part. I'd rather not bother you anymore. So, please, close the issue.
Thanks for your help and the time you've spent on me.

from chatfred.

chrislemke avatar chrislemke commented on July 28, 2024

Hey! That is indeed a very strange message. Maybe OpenAI has an internal error. I will leave this issue open for a while. Maybe we find a solution to this.

from chatfred.

chrislemke avatar chrislemke commented on July 28, 2024

Hey @EugeneTarasenko!
Any news on this? Does it work for you? I just released version 1.3.0. In a perfect world, this fixes your issue.

from chatfred.

EugeneTarasenko avatar EugeneTarasenko commented on July 28, 2024

Thanks. I still can't make dall-e work on their own website. I'm still getting this error:
Screen Shot 2023-03-20 at 11 10 39
I've just tested your new version of ChatFred and the response in the Alfred's debugging window is different now when typing cfi a man sitting in a chair e.g.:

[11:30:55.652] ChatFred[Keyword] Passing output 'a man sitting in a chair' to Run Script

[11:31:02.069] ChatFred[Debug] VARIABLES:{
  always_copy_to_clipboard = "1"
  always_speak = "1"
  api_key = "sk-XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX"
  cf_aliases = "joke=tell me a joke;"
  chat_gpt_model = "gpt-3.5-turbo"
  frequency_penalty = "0.0"
  history_length = "5"
  history_type = "search"
  image_size = "512"
  instruct_gpt_model = "text-davinci-003"
  jailbreak_prompt = ""
  max_tokens = ""
  presence_penalty = "0.0"
  save_to_file = "0"
  save_to_file_dir = "/Users/eugen"
  show_loading_indicator = "1"
  show_notifications = "1"
  temperature = "0"
  top_p = "1"
  transformation_prompt = "Write the text so that each letter is replaced by its successor in the alphabet."
}
RESPONSE:''

But I still can't get an image. Probably it's dall-e's fault.

from chatfred.

chrislemke avatar chrislemke commented on July 28, 2024

Looks like you really need to contact the guys from OpenAI. They can probably help you. You can also try creating a new account and check if that one works.

from chatfred.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.