Code Monkey home page Code Monkey logo

aerender's People

Contributors

devtud avatar

Stargazers

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

Watchers

 avatar  avatar  avatar

aerender's Issues

AErender doesn't exit when finished rendering...

I think it's has something to do with a plugin (Saber) but after running aerender it keeps running doing nothing after this:
PROGRESS: Total Time Elapsed: 1 Min, 2 Sec
So I found your aerender wrapper which is helpfull but my knowledge is limited with asyncio.
I tried a couple things:

#in this function async def check_and_raise(log_line: str):
#and also here in the async for log_line, log_tag in stdout_log_generator

if 'Total Time Elapsed' in log_line:
    
    process_task.stop()
    # 
    process_task.cancel()
    #
    process_task.done()

it stops but very messy and after rendering I would like to some other stuff...
Is there away to stop nicely?

Example out after stopping with stop()

DEBUG:asyncio:taking long time to close proactor
Traceback (most recent call last):
  File "test.py", line 19, in <module>
    asyncio.run(coro)
  File "C:\Users\marc.otten\AppData\Local\Programs\Python\Python37\lib\asyncio\runners.py", line 43, in run
    return loop.run_until_complete(main)
  File "C:\Users\marc.otten\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 584, in run_until_complete
    return future.result()
  File "C:\Users\marc.otten\Documents\mmogon-v2\venv\lib\site-packages\aerender\wrapper.py", line 112, in run
    result = await self.run_command(command)
  File "C:\Users\marc.otten\Documents\mmogon-v2\venv\lib\site-packages\aerender\wrapper.py", line 160, in run_command
    await check_and_raise(log_line)
  File "C:\Users\marc.otten\Documents\mmogon-v2\venv\lib\site-packages\aerender\wrapper.py", line 141, in check_and_raise
    process_task.stop()
AttributeError: '_asyncio.Task' object has no attribute 'stop'
Exception ignored in: <function BaseSubprocessTransport.__del__ at 0x000001FFB3E69048>
Traceback (most recent call last):
  File "C:\Users\marc.otten\AppData\Local\Programs\Python\Python37\lib\asyncio\base_subprocess.py", line 127, in __del__
  File "C:\Users\marc.otten\AppData\Local\Programs\Python\Python37\lib\asyncio\base_subprocess.py", line 104, in close
  File "C:\Users\marc.otten\AppData\Local\Programs\Python\Python37\lib\asyncio\proactor_events.py", line 86, in close
  File "C:\Users\marc.otten\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 688, in call_soon
  File "C:\Users\marc.otten\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 480, in _check_closed
RuntimeError: Event loop is closed
Exception ignored in: <function _ProactorBasePipeTransport.__del__ at 0x000001FFB3E6B400>
Traceback (most recent call last):
  File "C:\Users\marc.otten\AppData\Local\Programs\Python\Python37\lib\asyncio\proactor_events.py", line 95, in __del__
  File "C:\Users\marc.otten\AppData\Local\Programs\Python\Python37\lib\asyncio\proactor_events.py", line 86, in close
  File "C:\Users\marc.otten\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 688, in call_soon
  File "C:\Users\marc.otten\AppData\Local\Programs\Python\Python37\lib\asyncio\base_events.py", line 480, in _check_closed
RuntimeError: Event loop is closed

how to get callback when this finishes?

It seems this line will just skip over....
asyncio.run(coro)

is there an exit hook?
I'm currently using zmq to great effect - maybe I'll have to mangle the script to shoot out a message.

import asyncio
import zmq
import sys
from pathlib import Path
import os
from aerender import AERenderWrapper

asyncio.set_event_loop_policy(asyncio.WindowsProactorEventLoopPolicy())
port = 5555

if name == 'main':
context = zmq.Context()
socket = context.socket(zmq.SUB)
socket.setsockopt(zmq.SUBSCRIBE, b'')
socket.connect('tcp://192.168.1.110:%i' % port)

while True:
    msg = socket.recv_pyobj()
    print("%s:" % msg)
    if msg['event'] == 'startProcessing' :
        AERENDER_FULLPATH = Path('C:\\Program Files\\Adobe\\Adobe After Effects 2020\\Support Files\\aerender.exe')
        aerender = AERenderWrapper(exe_path=AERENDER_FULLPATH)
        coro = aerender.run(
            project_path=Path("C:\\Users\\jp\\Documents\\gitWorkspace\\coop\\aws-swf-python\\render\\profile.aep"),
            comp_name='render',
            output_path=Path('C:\\Users\\jp\\Documents\\gitWorkspace\\coop\\aws-swf-python\\render\\profile.mov'),
        )
        asyncio.run(coro)

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.