eoyilmaz / anima

VFX & Animation Pipeline Library
MIT License
137 stars 27 forks source link

hope u can explain the workflow of anima pipeline. #11

Closed tws0002 closed 6 years ago

tws0002 commented 7 years ago

hope you don't mind to give some explanation of how to use project project_dialog.UI() and task_dialog.UI(). for example, I don't know how this works!!

create_project

tws0002 commented 7 years ago

I have some question on DB.

eoyilmaz commented 7 years ago

I have some question on DB.

Currently, because we in our studio were managing the most of the stuff using the Stalker Pyramid (the WebUI) most of these doesn't have a correspondence in Qt UIs, but we can quickly add them.

how can I manage my studio database?

First of all, for me to answer it properly I need to now what do you mean by that.

how can I add user or delete user in db?

There is no "User Dialog" for now, but I can quickly create one which will let you create/update users. Deleting is not something I like, because you loose data. For now you can create a user by using pure Python:

from stalker import User
new_user = User(...)  # Enter details as shown in the Stalker tutorial
from stalker.db.session import DBSession
new_user.save()  # This is a new shortcut introduced in Stalker v0.2.21

how to delete a project that I missed create?

For now you can use Python again:

from stalker import Project
from stalker.db.session import DBSession

proj = Project.query.get(project_id)  # Enter the project_id here
DBSession.delete(proj)
DBSession.commit()

how to delete task?

You can either use Python:

from stalker import Task
from stalker.db.session import DBSession
t = Task.query.get(task_id)  # enter the task_id here
DBSession.delete(t)
DBSession.commit()

Or you can use the Version Creator UI right-click on a task and choose "Delete...".

eoyilmaz commented 7 years ago

When I have time, I'll create YouTube videos for most of the stuff that you're asking. We need this kind of stuff for new users anyway.

tws0002 commented 7 years ago

Thanks for the answer!!

eoyilmaz commented 7 years ago
  • Do we have any chance to test on stalker pyramid?

Sorry not yet. I'm still developing the new (and OpenSource) version.

  • How does anima pipeline handle project folder structure? it will create automatically after create a project using project_dialog.UI()?

It will not create the project structure. But after you've created a project, you can right-click on the name of the project in Version_Creator UI and select "Create Project Structure".

  • after execute anima\env\mayaEnv\userSetup.py userSetup.py: no **ANIMA_MAYA_SHELVES_PATH** env var for shelves seems like anima shelf is missing in the mayaEnv folder?

No, there is no Anima shelf in the anima project. This environment variable is for auto-loading some custom shelves (if you have any). Just create a custom shelve through Maya UI using regular tools. Then copy the *.mel file of the shelve to a folder (to a shared network folder for example) and then on every workstation in your studio set the ANIMA_MAYA_SHELVES_PATH to that folder. After that, every time you start Maya, the shelves inside this folder will be reloaded from there (also it will remove the previous one in the Maya). We've created this to prevent artists to remove any tools or change any shortcuts etc. from the shelves we are supplying for them.

  • Do you mind to explain more about version creator?

The Version Creator UI is for saving files for specific tasks. You can use the Take field to create new takes but a default take with name Main will always be created. The workflow is like that:

To create a new Version:

To Open a Version:

To Reference a Version:

To Import a Version:

To Export As a new Version:

Play with the UI. Most of the entries on the UI have context menus (right-click menus). Play with them. You'll see what are they doing.

tws0002 commented 7 years ago

Thanks for the explanation for Version Creator UI.

I have some question and problem! QUESTION

PROBLEM

eoyilmaz commented 7 years ago
  • Do I need to log in as admin in order to use full control of Version Creator UI right?

Yes and no. Yes admin has all of the Permissions, but as I explained below you can create a new group called Power Users and add your user to that group.

  • Can I create a new user as admin?

You can. Create a new user and assign it to the admins group, or better create a new Group with the name Power Users and assign the user to that group:

from stalker import db. User, Group
from stalker.db.session import DBSession

db.setup()
power_users = Group(
    name="Power Users"
)
power_users.save()

new_user = User(...)  # skipping the details
new_user.groups.append(power_users)
new_user.save()
  • How can I use animal Version Creator UI in photoshop and resolve?

For Photoshop you need to create a Python and a JavaScript file to be able to call the Version Creator UI:

The Python file content should be like:

from anima.ui.scripts import photoshop
photoshop.version_creator()

Save this file under, let's say as C:/photoshop_version_creator.py.

The JavaScript file content should be like this:

var versionCreator = new File("C:/photoshop_version_creator.py")
versionCreator.execute();

Save this to a file called _VERSION_CREATOR_.jsx and place the file under C:\Program Files\Adobe\Adobe Photoshop CC 2017\Presets\Scripts.

When you run Photoshop, you need to be able to see _VERSION_CREATOR_ entry under the File -> Scripts menu.

For this to work you need comtypes module installed in your system Python.

  • Are you using resolve to doing conform for 3D/Nuke render output?

Yes we use Resolve but with Fusion. But we do not have any automation there in Resolve. Fusion is okay though.

  • How can I setup this K:\SES\Library\anima_pipe\anima\anima\render to try?

Ooh... This module contains the H2A script and plugin that we've written to export data directly to Arnold and render in Maya. Just install the compiled plugins under anima/render/arnold/H2A/compiled_plugins for your Houdini version to your HOUDINI_DSO_PATH it should work fine.

  • What software are you using for daily review?

We do not do dailies anymore, for commercial projects at least. But for the movie projects we've used Stalker Pyramid which has proper Dailies workflow where you can watch movie clips or rendered still images and enter comments to the related task by using the supplied Dailies UI.

  • When I try to use Create Project Structure this error pops out

Hmm... Add an entry to your config.py:

stalker_server_internal_address = "192.168.0.1"
stalker_server_external_address = "192.168.0.1"

It is for Stalker Pyramid. But should be fine to enter some random numbers for now. Later you can enter the IP address of the Stalker Pyramid server (when it is finished of course :) ).

tws0002 commented 7 years ago

Question

Error

eoyilmaz commented 7 years ago
  • Do you think version creator can be used in After Effect?

Probably yes, if it is like Photoshop, I mean if it supports Win32Com (comtypes python module) then yes.

  • How can we setup all the plugin in side anima\anima\env\mayaEnv

Add the full path of that folder to your Maya.env file to MAYA_PLUG_IN_PATH environment variable.

  • How can I setup afanasy render farm system anima\anima\env\mayaEnv\afanasy.py for Maya, Houdini and nuke in order to make all the render output to the correct anima pipeline path?

Check their website at http://cgru.github.io/ then set your PYTHONPATH environment variable in Maya.env to point to the anima\anima (which you should already have done) that's it. Then open Maya using the CGRU shortcut (details in their website)...

  • How can we cache alembic, fbx, ass, rs and GPU to the correct anima pipeline path? is there have any tools to automate when doing publish?

The cache files (the *.ass, *.abc, *.rs files) are outputted to the Outputs folder under the path that the Version instance is saved (ex: {{Version.absolute_full_path/Outputs/alembic/*.abc}}). And a new Version instance for each cache format is created with a take name like Main@GPU for GPU Alembic caches or Main@ASS for Arnold Scene Source files and Main@RS for RedShift Proxies which contain the same object hierarchy but the shape nodes (generally) are coming from cache files. Unfortunately it is hard-coded and cannot be changed via a config file. But it is a good place (I think...).

Error

  • i having this error run _VERSION_CREATOR_ in photoshop

I haven't checked the Photoshop integration for a while. May be it is not working with Photoshop CC 2017 version. Let me investigate it...

tws0002 commented 7 years ago

Question

Error

eoyilmaz commented 7 years ago

You are trying to load regular Python scripts as Maya plug-ins, this is not the way of using them. What I've sugested you to do in my previous post was just to include the "anima/env/mayaEnv/plugins" folder in your Maya.env.

As for your Repr (Representations) field in Version Creator question; that field is to define which represantations should the scene opened with. It is used to change the type of the referenced files (if any).

For example, if you select ASS from that menu, the scene will open with the ASS versions of the referenced files if there are any. I should also state that this only works with the files that is created with Version Creator and refenced with Version Creator. Because upon publish, Version Creator creates the other representations of the scene and knows how to handle them and it doesn't allow any unpublished Version to be referenced to the scene.

tws0002 commented 7 years ago

Question

Error

eoyilmaz commented 7 years ago

Question

  • Because in our studio some of the artist using Nuke and some are using After Effect!! Can you make version_creator() for After Effect?

We do not use After Effects here so I haven't added it before. But this is an OpenSource system so you can add your own implementation. If you willing to pay for my time I can do it as a freelance job.

  • May I know how can we use all of this .py file in Maya? is there have any UI for all these scripts? mayaenv

Each of these files contain DocStrings in the Classes and the Class Methods or in the Functions. You can read them. But for short:

  • I have another question about version_creator().
  • In version_creator() can we just display specify file format on the specific software we using? maya_vc_file_exe for now, we can see both Maya and nuke in every software that using version_creator()!! Worry artist will open the wrong file!!

First of all your task structure seems to be wrong. It is not a good idea to keep all the animation tasks of different shots under a generic Animation task. Group your tasks under shots. I mean create a different Animation task for each Shot under the Shot. And I can add a ComboBox to filter-out different files but again it is not a good idea to store Version created in different applications like this.

Error

  • I having a problem when open file in nuke!! In nuke version_creator() we can open Maya or nuke file!! meaning there is no error message if open the wrong file format in nuke!! nuke_vc_file_exe

Yeah you shouldn't do that :) Just don't mix other programs Versions under the same Task, it is a bad practice. So I'm reluctant to write anything to filter these versions.

tws0002 commented 7 years ago

I having this error when adding a user to power_users group!!

from stalker import db, User, Group
from stalker.db.session import DBSession

db.setup()
power_users = Group(
    name="Power Users"
)
power_users.save()
# Error: 'Group' object has no attribute 'save'
# Traceback (most recent call last):
#   File "<maya console>", line 8, in <module>
# AttributeError: 'Group' object has no attribute 'save' # 

Stalker version

import stalker
stalker.__version__

# Result: '0.2.21' # 
tws0002 commented 7 years ago

or this is the only way to create a user?

from stalker import User
from stalker.db.session import DBSession
me = User(
    name="Erkan Ozgur Yilmaz",
    login="eoyilmaz",
    email="some_email_address@gmail.com",
    password="secret",
    description="This is me"
)

DBSession.add(me)
DBSession.commit()

because of the previous post error! I cant assign a user as admin in order to create project structure!

pls help Thanks Desmond

tws0002 commented 7 years ago

Question

eoyilmaz commented 7 years ago

You don't need to create a template for each project, you can reuse them from other projects. And I'll later investigate why Group.save() is not working.

tws0002 commented 7 years ago

This is how I added a user to admin group for now.

all_group = Group.query.all()
all_users = User.query.all()

admin_gp = all_group[0]
user = all_users[0]

user.groups.append(admin_gp)
DBSession.commit()

Sorry I don't really get what u mean by You don't need to create a template for each project, you can reuse them from other projects. can you explain how to do this?

Desmond

tws0002 commented 7 years ago

Hi eoyilmaz, Can you pls answer me about my previous question? bcos now I doing a test project using anima!! Hope you can help.

Thanks Desmond

eoyilmaz commented 7 years ago

OK sorry for the late response.

You can reuse the Structure from the other projects you've created like that:

from stalker import Structure, Project
project_structure = Structure.query.first()

new_project = Project(
    name='New Project',
    code='NP',
    structure=project_structure,
    # I'm skipping the other arguments
)
new_project.save()
tws0002 commented 7 years ago

Thanks for the help.

I still have this problem when using save()!!

from stalker import Structure, Project
project_structure = Structure.query.first()

new_project = Project(
    name='New Project',
    code='NP',
    structure=project_structure,
    # I'm skipping the other arguments
)
new_project.save()
# Error: 'Project' object has no attribute 'save'
# Traceback (most recent call last):
#   File "<maya console>", line 11, in <module>
# AttributeError: 'Project' object has no attribute 'save' # 

thanks Desmond

jasperges commented 7 years ago

I might be mistaken, but from what I can gather from the release page (and from my own testing), for saving it to the database you should use:

from stalker.db.session import DBSession

DBSession.save(new_project)

That being said. being able to use new_project.save() would even be nicer. 😄

eoyilmaz commented 7 years ago

Sorry for the inconvenience, it is my mistake there is no such thing as Project.save() (I think I planned it but didn't write the code yet!). @jasperges is right you can use DBSession.save(instance) for now. But I'll add SimpleEntity.save() which will propagate to the child classes.

tws0002 commented 7 years ago

thanks for the reply!! yes I use this

from stalker import Structure, Project
project_structure = Structure.query.first()
from stalker.db.session import DBSession

new_project = Project(
    name='New Project',
    code='NP',
    structure=project_structure,
    # I'm skipping the other arguments
)
DBSession.add(new_project)
DBSession.commit()

bcos I thought there is a new function u created!!

Question is this the reference link from stalker for creating a task, asset, shot and sequence in order to create a full project structure? https://pythonhosted.org/stalker/generated/stalker.models.task.Task.html#stalker.models.task.Task

Thanks

eoyilmaz commented 7 years ago

Yes it is.

On Sep 29, 2017 07:06, "Desmond" notifications@github.com wrote:

thanks for the reply!! yes I use this

from stalker import Structure, Project project_structure = Structure.query.first() from stalker.db.session import DBSession

new_project = Project( name='New Project', code='NP', structure=project_structure,

I'm skipping the other arguments

) DBSession.add(new_project) DBSession.commit()

bcos I thought there is a new function u created!!

Question is this the reference link from stalker for creating a task, asset, shot and sequence in order to create a full project structure? https://pythonhosted.org/stalker/generated/stalker. models.task.Task.html#stalker.models.task.Task

Thanks

— You are receiving this because you commented. Reply to this email directly, view it on GitHub https://github.com/eoyilmaz/anima/issues/11#issuecomment-333026030, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtDtH26TZa8NK8sZuQcTl1jWrOCoz5xks5snGzFgaJpZM4Ova9L .

jasperges commented 7 years ago

bcos I thought there is a new function u created!!

@eoyilmaz did. As we mentioned you can use DBSession.save(instance) instead of a DBSession.add(instance) and DBSession.commit(instance). So you can save 1 line of code.

tws0002 commented 7 years ago

@jasperges Thanks for reminding. are you using anima pipeline as well?

jasperges commented 7 years ago

@tws0002 Nope, I'm not using anima pipeline, but I am using/testing Stalker.

tws0002 commented 6 years ago

Question

Hi can you explain more about FilenameTemplate and Structure

Create a FilenameTemplate (to be used as file naming convention):
from stalker import FilenameTemplate

task_template = FilenameTemplate(
    name='Standard Task Filename Template',
    target_entity_type='Task',  # This is for files saved for Tasks
    path='{{project.repository.path}}/{{project.code}}/'
         '{%- for parent_task in parent_tasks -%}'
         '{{parent_task.nice_name}}/'
         '{%- endfor -%}',  # This is Jinja2 template code
    filename='{{version.nice_name}}_v{{"%03d"|format(version.version_number)}}'
)

Create a Structure that uses this template:

from stalker import Structure
standard_folder_structure = Structure(
    name='Standard Project Folder Structure',
    templates=[task_template],
    custom_template='{{project.code}}/References'  # If you need extra folders
)

i believe this will help to create a template folder starcture for every new project.

eoyilmaz commented 6 years ago

Yes, If you assign that Structure to the newly created Project, then yes, it will use that structure and the FilenameTemplate instances assigned to that Structure.

tws0002 commented 6 years ago

Thanks For the reply.

Question

tws0002 commented 6 years ago

Hi, there any answer?

I have another question about -how to import outsource project materials into anima pipeline?

tws0002 commented 6 years ago

Hi,

can you explain more how to use \anima\anima\util\stask_template_parser.py?

Thanks

eoyilmaz commented 6 years ago

It was something that I started to develop, but I never finished it.

Erkan Özgür Yılmaz VFX Supervisor & Photographer www.youtube.com/erkanozguryilmaz

On Mon, Apr 16, 2018, 20:57 Desmond notifications@github.com wrote:

Hi,

can you explain more how to use \anima\anima\util\stask_template_parser.py ?

Thanks

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eoyilmaz/anima/issues/11#issuecomment-381693963, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtDtLMGoxlcpv-FB-LR0U7SSU6I_8jkks5tpNuAgaJpZM4Ova9L .

tws0002 commented 6 years ago

Thanks for the reply.

I having an error when connecting to database by using houdini. Nuke and maya have no this problem!!

Here is the error.

Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "\anima\anima\ui\scripts\houdini.py", line 50, in version_creator
    do_db_setup()
  File "\anima\anima\utils\__init__.py", line 253, in do_db_setup
    db.setup(settings)
  File "\python_lib\stalker\db\__init__.py", line 78, in setup
    update_defaults_with_studio()
  File "\anima_pipe\python_lib\stalker\db\__init__.py", line 93, in update_defaults_with_studio
    studio = DBSession.query(Studio).first()
  File \anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2755, in first
    ret = list(self[0:1])
  File "\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2547, in __getitem__
    return list(res)
  File "\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2855, in __iter__
    return self._execute_and_instances(context)
  File "\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2878, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 945, in execute
    return meth(self, multiparams, params)
  File "\anima_pipe\python_lib\sqlalchemy\sql\elements.py", line 263, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1053, in _execute_clauseelement
    compiled_sql, distilled_params
  File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1189, in _execute_context
    context)
  File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1402, in _handle_dbapi_exception
    exc_info
  File "\anima_pipe\python_lib\sqlalchemy\util\compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1182, in _execute_context
    context)
  File "\anima_pipe\python_lib\sqlalchemy\engine\default.py", line 470, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) no such table: SimpleEntities [SQL: u'SELECT "Studios".id AS "Studios_id", "Studios".timing_resolution AS "Studios_timing_resolution", "Studios".start AS "Studios_start", "Studios".duration AS "Studios_duration", "Studios"."end" AS "Studios_end", "Entities".id AS "E
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "\anima\anima\ui\scripts\houdini.py", line 61, in version_creator
    h = houdini.Houdini()
  File "\anima\anima\env\houdini.py", line 23, in __init__
    for repo in Repository.query.all():
  File "\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2703, in all
    return list(self)
  File "\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2855, in __iter__
    return self._execute_and_instances(context)
  File "\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2878, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 945, in execute
    return meth(self, multiparams, params)
  File "\anima_pipe\python_lib\sqlalchemy\sql\elements.py", line 263, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1053, in _execute_clauseelement
    compiled_sql, distilled_params
  File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1189, in _execute_context
    context)
  File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1402, in _handle_dbapi_exception
    exc_info
  File "\anima_pipe\python_lib\sqlalchemy\util\compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1182, in _execute_context
    context)
  File "\anima_pipe\python_lib\sqlalchemy\engine\default.py", line 470, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) no such table: SimpleEntities [SQL: u'SELECT "Repositories".id AS "Repositories_id", "Entities".id AS "Entities_id", "SimpleEntities".stalker_version AS "SimpleEntities_stalker_version", "SimpleEntities".id AS "SimpleEntities_id", "SimpleEntities".entity_type AS "SimpleEntitie
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "K:\SES\Library\anima_pipe\anima\anima\ui\scripts\houdini.py", line 61, in version_creator
    h = houdini.Houdini()
  File "K:\SES\Library\anima_pipe\anima\anima\env\houdini.py", line 23, in __init__
    for repo in Repository.query.all():
  File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2703, in all
    return list(self)
  File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2855, in __iter__
    return self._execute_and_instances(context)
  File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2878, in _execute_and_instances
    result = conn.execute(querycontext.statement, self._params)
  File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 945, in execute
    return meth(self, multiparams, params)
  File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\sql\elements.py", line 263, in _execute_on_connection
    return connection._execute_clauseelement(self, multiparams, params)
  File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1053, in _execute_clauseelement
    compiled_sql, distilled_params
  File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1189, in _execute_context
    context)
  File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1402, in _handle_dbapi_exception
    exc_info
  File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\util\compat.py", line 203, in raise_from_cause
    reraise(type(exception), exception, tb=exc_tb, cause=cause)
  File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1182, in _execute_context
    context)
  File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\engine\default.py", line 470, in do_execute
    cursor.execute(statement, parameters)
OperationalError: (sqlite3.OperationalError) no such table: SimpleEntities [SQL: u'SELECT "Repositories".id AS "Repositories_id", "Entities".id AS "Entities_id", "SimpleEntities".stalker_version AS "SimpleEntities_stalker_version", "SimpleEntities".id AS "SimpleEntities_id", "SimpleEntities".entity_type AS "SimpleEntitie

in houdini python shell

>>> from stalker import db
>>> db.init()
Traceback (most recent call last):
  File "<console>", line 1, in <module>
  File \python_lib\stalker\db\__init__.py", line 124, in i
nit
    register(class_)
  File "\python_lib\stalker\db\__init__.py", line 525, in r
egister
    permissions_db = Permission.query.all()
  File "\python_lib\sqlalchemy\orm\query.py", line 2703, in
 all
    return list(self)
  File "\python_lib\sqlalchemy\orm\query.py", line 2855, in
 __iter__
    return self._execute_and_instances(context)
  File "\python_lib\sqlalchemy\orm\query.py", line 2876, in
 _execute_and_instances
    close_with_result=True)
  File "\python_lib\sqlalchemy\orm\query.py", line 2885, in
 _get_bind_args
    **kw
  File "\python_lib\sqlalchemy\orm\query.py", line 2867, in
 _connection_from_session
    conn = self.session.connection(**kw)
  File "\python_lib\sqlalchemy\orm\session.py", line 994, i
n connection
    bind = self.get_bind(mapper, clause=clause, **kw)
  File "\python_lib\sqlalchemy\orm\session.py", line 1356, 
in get_bind
    ', '.join(context)))
UnboundExecutionError: Could not locate a bind configured on mapper Mapper|Permissio
n|Permissions, SQL expression or this Session

Please help!! I'm in the middle of the production using anima but now only Houdini cannot connect to database!!

eoyilmaz commented 6 years ago

I believe your Houdini.env file is overriding your system PYTHONPATH environment variable. If this is the case, use $PYTHONPATH at the beginning of the PYTHONPATH variable:

PYTHONPATH=$PYTHONPATH;{Enter the rest of the variables after the ; sign}

Erkan Özgür Yılmaz VFX Supervisor & Photographer www.youtube.com/erkanozguryilmaz

On Fri, Apr 20, 2018, 11:31 Desmond notifications@github.com wrote:

Thanks for the reply.

I having an error when connecting to database by using houdini. Nuke and maya have no this problem!!

Here is the error.

Traceback (most recent call last): File "", line 1, in File "\anima\anima\ui\scripts\houdini.py", line 50, in version_creator do_db_setup() File "\anima\anima\utils__init.py", line 253, in do_db_setup db.setup(settings) File "\python_lib\stalker\db__init__.py", line 78, in setup update_defaults_with_studio() File "\anima_pipe\python_lib\stalker\db__init__.py", line 93, in update_defaults_with_studio studio = DBSession.query(Studio).first() File \anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2755, in first ret = list(self[0:1]) File "\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2547, in getitem return list(res) File "\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2855, in iter__ return self._execute_and_instances(context) File "\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2878, in _execute_and_instances result = conn.execute(querycontext.statement, self._params) File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 945, in execute return meth(self, multiparams, params) File "\anima_pipe\python_lib\sqlalchemy\sql\elements.py", line 263, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1053, in _execute_clauseelement compiled_sql, distilled_params File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1189, in _execute_context context) File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1402, in _handle_dbapi_exception exc_info File "\anima_pipe\python_lib\sqlalchemy\util\compat.py", line 203, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1182, in _execute_context context) File "\anima_pipe\python_lib\sqlalchemy\engine\default.py", line 470, in do_execute cursor.execute(statement, parameters) OperationalError: (sqlite3.OperationalError) no such table: SimpleEntities [SQL: u'SELECT "Studios".id AS "Studios_id", "Studios".timing_resolution AS "Studios_timing_resolution", "Studios".start AS "Studios_start", "Studios".duration AS "Studios_duration", "Studios"."end" AS "Studios_end", "Entities".id AS "E

Traceback (most recent call last): File "", line 1, in File "\anima\anima\ui\scripts\houdini.py", line 61, in version_creator h = houdini.Houdini() File "\anima\anima\env\houdini.py", line 23, in init for repo in Repository.query.all(): File "\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2703, in all return list(self) File "\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2855, in iter return self._execute_and_instances(context) File "\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2878, in _execute_and_instances result = conn.execute(querycontext.statement, self._params) File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 945, in execute return meth(self, multiparams, params) File "\anima_pipe\python_lib\sqlalchemy\sql\elements.py", line 263, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1053, in _execute_clauseelement compiled_sql, distilled_params File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1189, in _execute_context context) File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1402, in _handle_dbapi_exception exc_info File "\anima_pipe\python_lib\sqlalchemy\util\compat.py", line 203, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1182, in _execute_context context) File "\anima_pipe\python_lib\sqlalchemy\engine\default.py", line 470, in do_execute cursor.execute(statement, parameters) OperationalError: (sqlite3.OperationalError) no such table: SimpleEntities [SQL: u'SELECT "Repositories".id AS "Repositories_id", "Entities".id AS "Entities_id", "SimpleEntities".stalker_version AS "SimpleEntities_stalker_version", "SimpleEntities".id AS "SimpleEntities_id", "SimpleEntities".entity_type AS "SimpleEntitie Traceback (most recent call last): File "", line 1, in File "K:\SES\Library\anima_pipe\anima\anima\ui\scripts\houdini.py", line 61, in version_creator h = houdini.Houdini() File "K:\SES\Library\anima_pipe\anima\anima\env\houdini.py", line 23, in init for repo in Repository.query.all(): File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2703, in all return list(self) File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2855, in iter return self._execute_and_instances(context) File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\orm\query.py", line 2878, in _execute_and_instances result = conn.execute(querycontext.statement, self._params) File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 945, in execute return meth(self, multiparams, params) File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\sql\elements.py", line 263, in _execute_on_connection return connection._execute_clauseelement(self, multiparams, params) File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1053, in _execute_clauseelement compiled_sql, distilled_params File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1189, in _execute_context context) File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1402, in _handle_dbapi_exception exc_info File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\util\compat.py", line 203, in raise_from_cause reraise(type(exception), exception, tb=exc_tb, cause=cause) File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\engine\base.py", line 1182, in _execute_context context) File "K:\SES\Library\anima_pipe\python_lib\sqlalchemy\engine\default.py", line 470, in do_execute cursor.execute(statement, parameters) OperationalError: (sqlite3.OperationalError) no such table: SimpleEntities [SQL: u'SELECT "Repositories".id AS "Repositories_id", "Entities".id AS "Entities_id", "SimpleEntities".stalker_version AS "SimpleEntities_stalker_version", "SimpleEntities".id AS "SimpleEntities_id", "SimpleEntities".entity_type AS "SimpleEntitie

in houdini python shell

from stalker import db db.init() Traceback (most recent call last): File "", line 1, in File \pythonlib\stalker\db__init__.py", line 124, in i nit register(class) File "\python_lib\stalker\db__init__.py", line 525, in r egister permissions_db = Permission.query.all() File "\python_lib\sqlalchemy\orm\query.py", line 2703, in all return list(self) File "\python_lib\sqlalchemy\orm\query.py", line 2855, in iter return self._execute_and_instances(context) File "\python_lib\sqlalchemy\orm\query.py", line 2876, in _execute_and_instances close_with_result=True) File "\python_lib\sqlalchemy\orm\query.py", line 2885, in _get_bind_args kw File "\python_lib\sqlalchemy\orm\query.py", line 2867, in _connection_from_session conn = self.session.connection(kw) File "\python_lib\sqlalchemy\orm\session.py", line 994, i n connection bind = self.get_bind(mapper, clause=clause, **kw) File "\python_lib\sqlalchemy\orm\session.py", line 1356, in get_bind ', '.join(context))) UnboundExecutionError: Could not locate a bind configured on mapper Mapper|Permissio n|Permissions, SQL expression or this Session

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eoyilmaz/anima/issues/11#issuecomment-383025175, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtDtCVISAs_T7V7UUEbsEdVD2xoIL9kks5tqZzngaJpZM4Ova9L .

tws0002 commented 6 years ago

Hi, I think I did the PYTHONPATH correctly. the error still the same here is the bat file i create

@echo off
REM - Define variables
set "SPIPEDIR=K:/SES"
set "ANIMAPATH=%SPIPEDIR%/Library/anima_pipe"
set "ANIMAPYLIB=%SPIPEDIR%/Library/anima_pipe/python_lib"
set "AM_PROJECT_ROOT=%SPIPEDIR%/Library/anima_pipe"
set "AM_PIPELINE_PATH=%AM_PROJECT_ROOT%/hou"
set "AM_HOUDINI_PIPELINE_PATH=%AM_PIPELINE_PATH%/houdini"
set "AM_HOUDINI_PLUGINS_PATH=%AM_PIPELINE_PATH%/software/houdini/plugins"
set "py=%SPIPEDIR%/Tools/Python27;%SPIPEDIR%/Tools/Python27/Lib;%SPIPEDIR%/Tools/Python27/Lib/site-packages;%SPIPEDIR%/Tools/Python27/Scripts"
set "AM_HOUDINI_VERSION=Houdini 16.5.378"

 rem /* Houdini Variables */
set "PATH=%py%"
set "PYTHONPATH=%ANIMAPYLIB%;%AM_PROJECT_ROOT%/anima;%AM_PROJECT_ROOT%;%STALKER_CONFIG%"
set "HOUDINI_PATH=%AM_HOUDINI_PIPELINE_PATH%/setup;&"
set "HOUDINI_DSO_ERROR = 2"
set "HOUDINI_USER_PREF_DIR=C:/Users/%USERNAME%/Documents/Houdini__HVER__"

 rem /* Call Houdini */
set "HOUDINI=C:/Program Files/Side Effects Software/%AM_HOUDINI_VERSION%/bin"
set "PATH=%PATH%;%HOUDINI%"
houdinifx %PYSETUP%

exit

if I run from stalker import db then db.init() this error will come am_q_01

if I run

from stalker import db
db.setup()
db.init()
from anima.ui.scripts import houdini 
houdini.version_creator()

am_q_02

I think Houdini cannot connect to database!!

tws0002 commented 6 years ago

Hi, any idea what is the error?

eoyilmaz commented 6 years ago

I use "anima" daily with Houdini, believe me there is no problem.

What is the PYTHONPATH env variable of your system.

Did you try adding "$PYTHONPATH" to the PYTHONPATH var in houdini.env file.

Erkan Özgür Yılmaz VFX Supervisor & Photographer www.youtube.com/erkanozguryilmaz

On Tue, Apr 24, 2018, 11:11 Desmond notifications@github.com wrote:

Hi, any idea what is the error?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eoyilmaz/anima/issues/11#issuecomment-383861204, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtDtIgCoxYaqxSbFAha3l5OdCpITLEIks5truxWgaJpZM4Ova9L .

tws0002 commented 6 years ago

I'm not sure why only Houdini didn't work! I didn't set anything in houdini.env. and I didn't set PYTHONPATH env on my system!! I create a bat file to set up anima env need here is the .bat file I set

set "SPIPEDIR=K:/SES"
set "ANIMAPATH=%SPIPEDIR%/Library/anima_pipe"
set "ANIMAPYLIB=%SPIPEDIR%/Library/anima_pipe/python_lib"
set "AM_PROJECT_ROOT=%SPIPEDIR%/Library/anima_pipe"
set "AM_PIPELINE_PATH=%AM_PROJECT_ROOT%/hou"
set "AM_HOUDINI_PIPELINE_PATH=%AM_PIPELINE_PATH%/houdini"
set "AM_HOUDINI_PLUGINS_PATH=%AM_PIPELINE_PATH%/software/houdini/plugins"
set "py=%SPIPEDIR%/Tools/Python27;%SPIPEDIR%/Tools/Python27/Lib;%SPIPEDIR%/Tools/Python27/Lib/site-packages;%SPIPEDIR%/Tools/Python27/Scripts"
set "AM_HOUDINI_VERSION=Houdini 16.5.378"

 rem /* Houdini Variables */
set "PATH=%py%"
set "PYTHONPATH=%PYTHONPATH%;%ANIMAPYLIB%;%AM_PROJECT_ROOT%/anima;%AM_PROJECT_ROOT%;%STALKER_CONFIG%"
set "HOUDINI_PATH=%AM_HOUDINI_PIPELINE_PATH%/setup;&"
set "HOUDINI_DSO_ERROR = 2"
set "HOUDINI_USER_PREF_DIR=C:/Users/%USERNAME%/Documents/Houdini__HVER__"

 rem /* Call Houdini */
set "HOUDINI=C:/Program Files/Side Effects Software/%AM_HOUDINI_VERSION%/bin"
set "PATH=%PATH%;%HOUDINI%"
houdinifx %PYSETUP%
eoyilmaz commented 6 years ago

Can you run the following in houdini python console:

import sys import os

for path in sys.path: print(path)

print(os.environ["PYTHONPATH"])

Erkan Özgür Yılmaz VFX Supervisor & Photographer www.youtube.com/erkanozguryilmaz

On Fri, Apr 27, 2018, 03:43 Desmond notifications@github.com wrote:

I'm not sure why only Houdini didn't work! I didn't set anything in houdini.env. and I didn't set PYTHONPATH env on my system!! I create a bat file to set up anima env need here is the .bat file I set

set "SPIPEDIR=K:/SES" set "ANIMAPATH=%SPIPEDIR%/Library/anima_pipe" set "ANIMAPYLIB=%SPIPEDIR%/Library/anima_pipe/python_lib" set "AM_PROJECT_ROOT=%SPIPEDIR%/Library/anima_pipe" set "AM_PIPELINE_PATH=%AM_PROJECT_ROOT%/hou" set "AM_HOUDINI_PIPELINE_PATH=%AM_PIPELINE_PATH%/houdini" set "AM_HOUDINI_PLUGINS_PATH=%AM_PIPELINE_PATH%/software/houdini/plugins" set "py=%SPIPEDIR%/Tools/Python27;%SPIPEDIR%/Tools/Python27/Lib;%SPIPEDIR%/Tools/Python27/Lib/site-packages;%SPIPEDIR%/Tools/Python27/Scripts" set "AM_HOUDINI_VERSION=Houdini 16.5.378"

rem / Houdini Variables / set "PATH=%py%" set "PYTHONPATH=%PYTHONPATH%;%ANIMAPYLIB%;%AM_PROJECT_ROOT%/anima;%AM_PROJECT_ROOT%;%STALKER_CONFIG%" set "HOUDINI_PATH=%AM_HOUDINI_PIPELINE_PATH%/setup;&" set "HOUDINI_DSO_ERROR = 2" set "HOUDINI_USER_PREF_DIR=C:/Users/%USERNAME%/Documents/HoudiniHVER"

rem / Call Houdini / set "HOUDINI=C:/Program Files/Side Effects Software/%AM_HOUDINI_VERSION%/bin" set "PATH=%PATH%;%HOUDINI%" houdinifx %PYSETUP%

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eoyilmaz/anima/issues/11#issuecomment-384838592, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtDtKZvU7LAtlJbmpkgOlPexPsgW8qHks5tsnfOgaJpZM4Ova9L .

tws0002 commented 6 years ago

here is the result

>>> import sys
>>> import os 
>>> for path in sys.path:print(path)
... 
C:/PROGRA~1/SIDEEF~1/HOUDIN~1.378/python27/lib/site-packages-ui-forced
C:/PROGRA~1/SIDEEF~1/HOUDIN~1.378/python27/lib/site-packages-forced

K:\SES\Library\anima_pipe\python_lib
K:\SES\Library\anima_pipe\anima
K:\SES\Library\anima_pipe\hou\houdini\software\houdini\plugins\Houdini-Toolbox\pytho
n
K:\SES\Library\anima_pipe
K:\SES\Library\SP_db\anima_db
K:\SES\Library\cgru.2.2.2\afanasy\python
K:\SES\Library\cgru.2.2.2\lib\python
K:\SES\Library\cgru.2.2.2\plugins\houdini
C:\PROGRA~1\SIDEEF~1\HOUDIN~1.378\python27\python27.zip
C:\PROGRA~1\SIDEEF~1\HOUDIN~1.378\python27\DLLs
C:\PROGRA~1\SIDEEF~1\HOUDIN~1.378\python27\lib
C:\PROGRA~1\SIDEEF~1\HOUDIN~1.378\python27\lib\plat-win
C:\PROGRA~1\SIDEEF~1\HOUDIN~1.378\python27\lib\lib-tk
C:\Program Files\Side Effects Software\Houdini 16.5.378\bin
C:\PROGRA~1\SIDEEF~1\HOUDIN~1.378\python27
C:\PROGRA~1\SIDEEF~1\HOUDIN~1.378\python27\lib\site-packages
K:/SES/Third-Party/arnold/htoa/16.5.378/htoa-3.0.0_r75a8c5d_houdini-16.5.378/python2
.7libs
K:/SES/Library/anima_pipe/hou/houdini/software/houdini/plugins/Bento/python2.7libs
C:/PROGRA~1/SIDEEF~1/HOUDIN~1.378/houdini/python2.7libs
C:/PROGRA~1/SIDEEF~1/HOUDIN~1.378/houdini/python2.7libs
K:/SES/Library/anima_pipe/hou/houdini/software/houdini/plugins/qLib/scripts/python
K:/SES/Library/anima_pipe/hou/houdini/software/houdini/plugins/Aelib/scripts/python
K:/SES/Library/anima_pipe/hou/houdini/software/houdini/plugins/jth-houdini-tools/hou
dini/scripts/python
K:/SES/Third-Party/arnold/htoa/16.5.378/htoa-3.0.0_r75a8c5d_houdini-16.5.378/scripts
/python
K:/SES/Library/anima_pipe/hou/houdini/software/houdini/plugins/Houdini-Toolbox/houdi
ni/scripts/python
K:/SES/Library/anima_pipe/hou/houdini/software/houdini/plugins/GameDevelopmentToolse
t/scripts/python
>>> print(os.environ["PYTHONPATH"])
K:/SES/Library/anima_pipe/python_lib;
K:/SES/Library/anima_pipe/anima;
K:/SES/Library/anima_pipe/hou/houdini/software/houdini/plugins/Houdini-Toolbox/python;
K:/SES/Library/anima_pipe;
K:/SES/Library/SP_db/anima_db;
K:/SES/Library/cgru.2.2.2/afanasy/python;
K:/SES/Library/cgru.2.2.2/lib/python;
K:/SES/Library/cgru.2.2.2/plugins/houdini
tws0002 commented 6 years ago

Hi, do you have any idea on this error?

eoyilmaz commented 6 years ago

What does

os.environ["STALKER_PATH"]

gives?

Erkan Özgür Yılmaz VFX Supervisor & Photographer www.youtube.com/erkanozguryilmaz

On Tue, May 1, 2018, 10:21 Desmond notifications@github.com wrote:

Hi, do you have any idea on this error?

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eoyilmaz/anima/issues/11#issuecomment-385615142, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtDtGurcj4yP2TBqBZGnOziq1bglLkcks5tuA0WgaJpZM4Ova9L .

tws0002 commented 6 years ago

here is the result

>>> import os
>>> import sys
>>> os.environ["STALKER_PATH"]
'K:/SES/Library/anima_pipe/python_lib/stalker'
>>> import stalker 
>>> stalker 
<module 'stalker' from 'K:\SES\Library\anima_pipe\python_lib\stalker\__init__.pyc'>
>>> 
eoyilmaz commented 6 years ago

Do you have the "config.py" file there?

Erkan Özgür Yılmaz VFX Supervisor & Photographer www.youtube.com/erkanozguryilmaz

On Tue, May 1, 2018, 21:03 Desmond notifications@github.com wrote:

here is the result

import os import sys os.environ["STALKER_PATH"] 'K:/SES/Library/anima_pipe/python_lib/stalker' import stalker stalker <module 'stalker' from 'K:\SES\Library\anima_pipe\python_lib\stalker__init__.pyc'>

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eoyilmaz/anima/issues/11#issuecomment-385742206, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtDtBX5_2VmCtCu4W3YM2Dq53IRpHcJks5tuKNYgaJpZM4Ova9L .

eoyilmaz commented 6 years ago

I believe you have configurated your Stalker setup in a wrong way. The STALKER_PATH variable should be directed to a directory that has the config.py file (the config.py file that is created by you). But in your case you have configured it to show the stalker library path.

Erkan Özgür Yılmaz VFX Supervisor & Photographer www.youtube.com/erkanozguryilmaz

On Tue, May 1, 2018, 21:03 Desmond notifications@github.com wrote:

here is the result

import os import sys os.environ["STALKER_PATH"] 'K:/SES/Library/anima_pipe/python_lib/stalker' import stalker stalker <module 'stalker' from 'K:\SES\Library\anima_pipe\python_lib\stalker__init__.pyc'>

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eoyilmaz/anima/issues/11#issuecomment-385742206, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtDtBX5_2VmCtCu4W3YM2Dq53IRpHcJks5tuKNYgaJpZM4Ova9L .

tws0002 commented 6 years ago

yes

tws0002 commented 6 years ago

you are right!! I using STALKER_CONFIG to point to my config.py!! after I change STALKER_CONFIG to STALKER_PATH everything back to normal.

Thank you very much

eoyilmaz commented 6 years ago

You're welcome 👍

Erkan Özgür Yılmaz VFX Supervisor & Photographer www.youtube.com/erkanozguryilmaz

On Tue, May 1, 2018, 21:30 Desmond notifications@github.com wrote:

you are right!! I using STALKER_CONFIG to point to my config.py!! after I change STALKER_CONFIG to STALKER_PATH everything back to normal.

Thank you very much

— You are receiving this because you were mentioned. Reply to this email directly, view it on GitHub https://github.com/eoyilmaz/anima/issues/11#issuecomment-385749611, or mute the thread https://github.com/notifications/unsubscribe-auth/ABtDtJoOOOUuntx5z-GPz8jXtrlgdbAtks5tuKnEgaJpZM4Ova9L .