Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

Python COM ports and CC 19.0

Explorer ,
Jan 18, 2018 Jan 18, 2018

I have program written with Python 2 that runs externally, which tells Photoshop to save out .dds files. In previous versions of PS this would work fine, but since the 19 update the process often gets interrupted at various stages. Sometimes the export can run to completion, other times it stops and I get an error log message like:

Traceback (most recent call last):

  File "main.py", line 690, in clicked_export

  File "exporter.pyc", line 212, in export

  File "comtypes\client\lazybind.pyc", line 168, in __getattr__

  File "comtypes\automation.pyc", line 729, in _invoke

_ctypes.COMError: (-2147417846, 'The message filter indicated that the application is busy.', (None, None, None, 0, None))

Edit: It seems like I might be able to get around this actually by implementing sleep, but I have had to put this in three different locations so far and it's kinda like playing Whack-A-Mole because the error can show up anywhere depending on when Photoshop feels like being "busy".

SAVING = True

while SAVING:

  try:

    self.save_as_dds(file_path, group)

    SAVING = False

  except comtypes.COMError as e:

    print e

    time.sleep(0.5)

TOPICS
Actions and scripting
1.9K
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Adobe
Jan 18, 2018 Jan 18, 2018

Is this machine dedicated to your external app? Meaning no actual user could be using Ps at the same time? Are these happening during startup of the app? What else is your external app doing with Photoshop besides saving the dds?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 18, 2018 Jan 18, 2018

The machine is not dedicated to this no, we have Maya and other resource heavy programs running along side Photoshop.

It's a texture exporter with a GUI component also that lets you set up which layer groups to export with different settings. (Kind of like how Quixel works) Storing and reading export settings in fileInfo never causes problems.. it's only giving up when actually performing layer actions, saving the file or, undoing resize commands. So lot's of people using it and they all crash st different lines of code and different times of the day. But it's pretty much just the "Application is busy" error. As mentioned, was not an issue in earlier versions of Photoshop

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Jan 18, 2018 Jan 18, 2018

When you say "crash" you mean that your external program quits with the error or Photoshop is crashing? And there is no dialog up in Photoshop and it appears to be running ok when this occurs? If you just try it again on the failure will it perform whatever you tried? A try then wait then try again kind of operation? You have the latest 19 installed?

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Explorer ,
Jan 18, 2018 Jan 18, 2018

Ah yes, sorry, it is the external program that is crashing.

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Feb 02, 2018 Feb 02, 2018

We've been seeing these issues as well ever since upgrading to Photoshop CC 2018. We have a number of Python tools that communicate over COM and we keep getting errors like this:

pywintypes.com_error: (-2147417846, 'The message filter indicated that the application is busy.', None, None)

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
New Here ,
Jan 16, 2025 Jan 16, 2025
LATEST

Have you found any solution regarding this issue? I understood how it occurred, but I haven't fully understood its source

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines