cyrildiagne / ar-cutpaste

Cut and paste your surroundings using AR

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Not working in linux

AIGamer28100 opened this issue · comments

i tried working with this in my Linux (Ubuntu 20.04) with my Android Device .
it was able to cut the image but when tried to paste in a Libreoffice Writer i am getting a error.

aigamer@AIGAMER:~/Desktop/Other Files/ar-cutpaste-master/server/src$ sudo python3.7 main.py --basnet_service_ip="http://192.168.1.13:8080"

  • Serving Flask app "main" (lazy loading)
  • Environment: development
  • Debug mode: on
    INFO:werkzeug: * Running on http://0.0.0.0:8080/ (Press CTRL+C to quit)
    INFO:werkzeug: * Restarting with stat
    WARNING:werkzeug: * Debugger is active!
    INFO:werkzeug: * Debugger PIN: 202-626-663
    INFO:root: CUT
    INFO:root: > sending to BASNet...
    INFO:werkzeug:192.168.1.13 - - [13/May/2020 18:18:05] "POST / HTTP/1.1" 405 -
    INFO:root: > saving results...
    INFO:root: > opening mask...
    INFO:werkzeug:192.168.1.4 - - [13/May/2020 18:18:05] "POST /cut HTTP/1.1" 500 -
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/flask/app.py", line 2463, in call
    return self.wsgi_app(environ, start_response)
    File "/usr/lib/python3/dist-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
    File "/usr/local/lib/python3.7/dist-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
    File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in reraise
    raise value
    File "/usr/lib/python3/dist-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/usr/local/lib/python3.7/dist-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
    File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in reraise
    raise value
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functionsrule.endpoint
    File "/home/aigamer/Desktop/Other Files/ar-cutpaste-master/server/src/main.py", line 84, in save
    mask = Image.open('cut_mask.png').convert("L")
    File "/usr/local/lib/python3.7/dist-packages/PIL/Image.py", line 2896, in open
    "cannot identify image file %r" % (filename if filename else fp)
    PIL.UnidentifiedImageError: cannot identify image file 'cut_mask.png'
    INFO:root: PASTE
    INFO:root: > loading image...
    INFO:root: > grabbing screenshot...
    INFO:root: > finding projected point...
    INFO:root:659, 481
    INFO:root: > sending to photoshop...
    ERROR:photoshop:Is Photoshop running and configured for remote connection?
    Traceback (most recent call last):
    File "/usr/local/lib/python3.7/dist-packages/photoshop/init.py", line 165, in _reset_connection
    self.socket = socket.create_connection((self.host, self.port))
    File "/usr/lib/python3.7/socket.py", line 728, in create_connection
    raise err
    File "/usr/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
    ConnectionRefusedError: [Errno 111] Connection refused
    INFO:werkzeug:192.168.1.4 - - [13/May/2020 18:18:20] "POST /paste HTTP/1.1" 500 -
    Traceback (most recent call last):
    File "/usr/lib/python3/dist-packages/flask/app.py", line 2463, in call
    return self.wsgi_app(environ, start_response)
    File "/usr/lib/python3/dist-packages/flask/app.py", line 2449, in wsgi_app
    response = self.handle_exception(e)
    File "/usr/local/lib/python3.7/dist-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1866, in handle_exception
    reraise(exc_type, exc_value, tb)
    File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in reraise
    raise value
    File "/usr/lib/python3/dist-packages/flask/app.py", line 2446, in wsgi_app
    response = self.full_dispatch_request()
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1951, in full_dispatch_request
    rv = self.handle_user_exception(e)
    File "/usr/local/lib/python3.7/dist-packages/flask_cors/extension.py", line 161, in wrapped_function
    return cors_after_request(app.make_response(f(*args, **kwargs)))
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1820, in handle_user_exception
    reraise(exc_type, exc_value, tb)
    File "/usr/lib/python3/dist-packages/flask/_compat.py", line 39, in reraise
    raise value
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1949, in full_dispatch_request
    rv = self.dispatch_request()
    File "/usr/lib/python3/dist-packages/flask/app.py", line 1935, in dispatch_request
    return self.view_functionsrule.endpoint
    File "/home/aigamer/Desktop/Other Files/ar-cutpaste-master/server/src/main.py", line 168, in paste
    err = ps.paste(img_path, name, x, y, password=args.photoshop_password)
    File "/home/aigamer/Desktop/Other Files/ar-cutpaste-master/server/src/ps.py", line 19, in paste
    with PhotoshopConnection(password=password) as conn:
    File "/usr/local/lib/python3.7/dist-packages/photoshop/init.py", line 129, in init
    self._reset_connection()
    File "/usr/local/lib/python3.7/dist-packages/photoshop/init.py", line 165, in _reset_connection
    self.socket = socket.create_connection((self.host, self.port))
    File "/usr/lib/python3.7/socket.py", line 728, in create_connection
    raise err
    File "/usr/lib/python3.7/socket.py", line 716, in create_connection
    sock.connect(sa)
    ConnectionRefusedError: [Errno 111] Connection refused

Will this only work in Windows with Photoshop ??
Please help me out.

Yes sorry only Photoshop is supported in the master branch.
The clipboard branch works with more softwares but is limited to macOS at this stage.

Yes sorry only Photoshop is supported in the master branch.
The clipboard branch works with more softwares but is limited to macOS at this stage.

Well then eagerly waiting for this to work on all platforms.
Thank you .