question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Typo in application.py, .batch tries to call app.bath

See original GitHub issue
    def batch(self, *args, **kwargs):
        """Runs the batch automation routine.
        Similar to the **File** > **Automate** > **Batch** command.
        """
        self.app.bath(*args, **kwargs)

The batch function tries to call self.app.bath which doesn’t exist.

As I assume it neither wants to take a bath nor a shower I assume it’s intended to call batch.

Issue Analytics

  • State:closed
  • Created 10 months ago
  • Comments:5 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
loonghaocommented, Nov 26, 2022

@Alyxion I released a new version to implement app.batch and fix typo

have a new example for this: https://loonghao.github.io/photoshop-python-api/examples/#run-batch

0reactions
Alyxioncommented, Nov 27, 2022

Awesome, thank you very much for the fix 😃. Will give a try as soon as I’ve finished my current project. As I needed it for a project (your package helped me here a lot, so thanks!) I had to build a workaround meanwhile. One evil thing in this work around was - though I assume you will have the same issue with batch processing because it seems to don’t throw a classic com exception - that “Quickactions -> Remove background” opens a Dialog window if you provide a picture which is very blurry or really doesn’t contain an object. All batch processes actually just completely halted then waited for someone to click the “OK”. In the end I ended up writing a background thread which watches if the main thread is stuck and if so kills Photoshop via

for proc in psutil.process_iter():
        if proc.name().lower() == "photoshop.exe":
            print("Photoshop timed out, trying to kill Photoshop...")
            proc.kill()
            time.sleep(2.0)
            return True
    return False

Hope Adobe will fix this soon.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Michael Ikemann Alyxion - GitHub
Typo in application.py, .batch tries to call app.bath. def batch(self, *args, **kwargs): """Runs the batch automation routine.
Read more >
How to get the path of the batch script in Windows?
To convert it to a full path, try something like this: pushd %~dp0 set script_dir=%CD% popd ... %CD% returns the current directory the...
Read more >
Batch file - Wikipedia
A batch file is a script file in DOS, OS/2 and Microsoft Windows. It consists of a series of commands to be executed...
Read more >
Problem with batching tensors - InvalidArgumentError: Cannot ...
Problem solved. It was a dumb and silly mistake after all. I was being naive - maybe I need to sleep, I don't...
Read more >
Python API for Photoshop. - PythonRepo
Typo in application.py, .batch tries to call app.bath. def batch(self, *args, **kwargs): """Runs the batch automation routine.
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found