agoulddesign / krita-bg-remove-bria

A simple plugin for Krita that automatically removes the background of an image using BriaAI's API in seconds
MIT License
4 stars 0 forks source link

Error SSL certificate error #3

Closed Mojas84 closed 1 month ago

Mojas84 commented 2 months ago

Hi please i try it Krita-BG-Remove-Bria but after setings api key and click remove write only Error: SSL cerificate verification failed. You may need update cerificate.

agoulddesign commented 2 months ago

Hello, what version of the plugin are you using, and what operating system?

Mojas84 commented 2 months ago

Hi. Latest 1.21 . Have Win11 24H2 august update....

agoulddesign commented 2 months ago

I just tested on Win11 32H2 and it worked fine. Can you make sure you don't have an antivirus or firewall blocking traffic to/from Krita?

Here is a ping test to see if it can reach the server. Go to Tools -> Scripts -> Scripter and paste this:

import socket
import time

def simple_ping(host, count=4):
    print(f"Pinging {host}...")
    for i in range(count):
        try:
            start_time = time.time()
            # Create a socket object
            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            # Set a timeout for the connection attempt
            sock.settimeout(2)
            # Attempt to connect
            result = sock.connect_ex((host, 80))
            end_time = time.time()

            if result == 0:
                print(f"Ping successful: {host} - Time: {(end_time - start_time)*1000:.2f}ms")
            else:
                print(f"Ping failed: {host} - Host is not responding")

            # Close the socket
            sock.close()
        except socket.gaierror:
            print(f"Ping error: {host} - Hostname could not be resolved")
        except socket.error:
            print(f"Ping error: {host} - Couldn't connect to server")

        # Wait a second before the next ping
        time.sleep(1)

# Example usage
simple_ping('engine.prod.bria-api.com')
Mojas84 commented 2 months ago

I just tested on Win11 32H2 and it worked fine. Can you make sure you don't have an antivirus or firewall blocking traffic to/from Krita?

Here is a ping test to see if it can reach the server. Go to Tools -> Scripts -> Scripter and paste this:

import socket
import time

def simple_ping(host, count=4):
    print(f"Pinging {host}...")
    for i in range(count):
        try:
            start_time = time.time()
            # Create a socket object
            sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)
            # Set a timeout for the connection attempt
            sock.settimeout(2)
            # Attempt to connect
            result = sock.connect_ex((host, 80))
            end_time = time.time()

            if result == 0:
                print(f"Ping successful: {host} - Time: {(end_time - start_time)*1000:.2f}ms")
            else:
                print(f"Ping failed: {host} - Host is not responding")

            # Close the socket
            sock.close()
        except socket.gaierror:
            print(f"Ping error: {host} - Hostname could not be resolved")
        except socket.error:
            print(f"Ping error: {host} - Couldn't connect to server")

        # Wait a second before the next ping
        time.sleep(1)

# Example usage
simple_ping('engine.prod.bria-api.com')

==== Warning: Script not saved! ==== Pinging engine.prod.bria-api.com... Ping successful: engine.prod.bria-api.com - Time: 132.05ms Ping successful: engine.prod.bria-api.com - Time: 30.69ms Ping successful: engine.prod.bria-api.com - Time: 18.80ms Ping successful: engine.prod.bria-api.com - Time: 21.57ms ==== Warning: Script not saved! ====

agoulddesign commented 2 months ago

Are you using the most recent version of Krita?

Mojas84 commented 1 month ago

Are you using the most recent version of Krita? Now is work after update Krita

agoulddesign commented 1 month ago

Glad to hear! Closing