Coder Social home page Coder Social logo

kyamagu / photoshop-connection Goto Github PK

View Code? Open in Web Editor NEW
22.0 4.0 3.0 476 KB

Python package to remotely execute ExtendScript in Adobe Photoshop.

Home Page: https://photoshop-connection.readthedocs.io

License: MIT License

Python 87.51% Jinja 12.49%
photoshop python extendscript

photoshop-connection's People

Contributors

alexeykomp avatar dependabot[bot] avatar kyamagu avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar

photoshop-connection's Issues

Modernize package management

The current travis setup is outdated. Should migrate to:

  • Migrate to Github Actions for tests and deployment (cibuildwheel)
  • Apply auto formatted for lining (pysen)
  • Annotate mypy types

conn.open_document() doesn't work

Hello,

I have been tested succesfully uploaded photoshop file from client to remote server and it is correct file path show to me. But open_document does not work.

My codes

from photoshop import PhotoshopConnection

with PhotoshopConnection(password='123456', host="194.31.59.56") as conn:
    uploadedPath = ""
    
    with open('test.psd', 'rb') as f:
        uploadedPath = conn.upload(f.read(), suffix='.psd')

    print(uploadedPath)
    conn.open_document(uploadedPath)

Return errors like this;

Reloaded modules: photoshop, photoshop.protocol, photoshop.crypto, photoshop.api
Error: Unknown JavaScript error
Traceback (most recent call last):
  File "C:\_my-mind\_codes\photoshop-connect\photoshop\__init__.py", line 188, in _transaction
    yield txn
  File "C:\_my-mind\_codes\photoshop-connect\photoshop\__init__.py", line 222, in execute
    response = txn.receive(timeout=timeout)
  File "C:\_my-mind\_codes\photoshop-connect\photoshop\__init__.py", line 44, in receive
    raise response
  File "C:\_my-mind\_codes\photoshop-connect\photoshop\__init__.py", line 66, in dispatch
    'Error: %s' % response['body'].decode('utf-8', 'ignore')
RuntimeError: Error: Unknown JavaScript error
C:\Users\ADMINI~1\AppData\Local\Temp\2\tempdata8.tmp.psd
Traceback (most recent call last):

  File "C:\_my-mind\_codes\photoshop-connect\untitled0.py", line 17, in <module>
    conn.open_document(uploadedPath)

  File "C:\_my-mind\_codes\photoshop-connect\photoshop\__init__.py", line 306, in open_document
    return self.execute(self._render('open.js.j2', locals()))

  File "C:\_my-mind\_codes\photoshop-connect\photoshop\__init__.py", line 222, in execute
    response = txn.receive(timeout=timeout)

  File "C:\_my-mind\_codes\photoshop-connect\photoshop\__init__.py", line 44, in receive
    raise response

  File "C:\_my-mind\_codes\photoshop-connect\photoshop\__init__.py", line 66, in dispatch
    'Error: %s' % response['body'].decode('utf-8', 'ignore')

RuntimeError: Error: Unknown JavaScript error

Thank you.

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.