Error during path replacement on Windows #52174

Closed
opened 2017-07-24 17:31:28 +02:00 by Stefan Grassberger · 12 comments

System Information
Windows 10 64-bit GeForce GTX 660

Blender Version
Broken: 2.78b 3c04373
Blender Cloud Add-on 1.7.2

Short description of error
Path replacement fails, because the add-on is looking for a key named win32, while Flamenco Manager provides windows, resulting in a KeyError.
Additionally, the path variables {render} and {job_storage} fail to be prepended to the path on line 46 in sdk.py.

SORTING PATH REPLACEMENTS
ERROR:THREE:Exception while running task: 'win32'
DEBUG:THREE:Stopping async task
INFO:THREE:Signalling that we want to cancel anything that's running.
ERROR:THREE:Exception from asynchronous task
Traceback (most recent call last):
  File "C:\Users\StevyGee\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\async_loop.py", line 279, in _stop_async_task
    self.async_task.result()  # This re-raises any exception of the task.
  File "c:\Program Files\Blender Foundation\Blender\2.78\python\lib\asyncio\futures.py", line 274, in result
    raise self._exception
  File "c:\Program Files\Blender Foundation\Blender\2.78\python\lib\asyncio\tasks.py", line 239, in _step
    result = coro.send(None)
  File "C:\Users\StevyGee\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\flamenco\__init__.py", line 197, in async_execute
    'filepath': manager.replace_path(outfile),
  File "C:\Users\StevyGee\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\flamenco\sdk.py", line 37, in replace_path
    for varname, path in self._sorted_path_replacements():
  File "C:\Users\StevyGee\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\flamenco\sdk.py", line 28, in _sorted_path_replacements
    for varname, platform_replacements in sorted(items, key=by_length)]
  File "C:\Users\StevyGee\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\flamenco\sdk.py", line 28, in <listcomp>
    for varname, platform_replacements in sorted(items, key=by_length)]
KeyError: 'win32'

Possible fix
In sdk.py after line 26, add:

        if sys.platform == 'win32':
            platform = 'windows'

In sdk.py, replace line 46 with:

            return replacement_root.as_posix() + relpath.as_posix()

Exact steps for others to reproduce the error

  • Apply fix described here
  • Configure Blender Cloud Add-on (select Manager, Project, as well as Storage and Output directories)
  • Save startup scene in Flamenco Project directory
  • In Render Window click Render on Flamenco
**System Information** Windows 10 64-bit GeForce GTX 660 **Blender Version** Broken: 2.78b 3c04373 Blender Cloud Add-on 1.7.2 **Short description of error** Path replacement fails, because the add-on is looking for a key named `win32`, while Flamenco Manager provides `windows`, resulting in a KeyError. Additionally, the path variables `{render}` and `{job_storage}` fail to be prepended to the path on line 46 in sdk.py. ``` SORTING PATH REPLACEMENTS ERROR:THREE:Exception while running task: 'win32' DEBUG:THREE:Stopping async task INFO:THREE:Signalling that we want to cancel anything that's running. ERROR:THREE:Exception from asynchronous task Traceback (most recent call last): File "C:\Users\StevyGee\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\async_loop.py", line 279, in _stop_async_task self.async_task.result() # This re-raises any exception of the task. File "c:\Program Files\Blender Foundation\Blender\2.78\python\lib\asyncio\futures.py", line 274, in result raise self._exception File "c:\Program Files\Blender Foundation\Blender\2.78\python\lib\asyncio\tasks.py", line 239, in _step result = coro.send(None) File "C:\Users\StevyGee\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\flamenco\__init__.py", line 197, in async_execute 'filepath': manager.replace_path(outfile), File "C:\Users\StevyGee\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\flamenco\sdk.py", line 37, in replace_path for varname, path in self._sorted_path_replacements(): File "C:\Users\StevyGee\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\flamenco\sdk.py", line 28, in _sorted_path_replacements for varname, platform_replacements in sorted(items, key=by_length)] File "C:\Users\StevyGee\AppData\Roaming\Blender Foundation\Blender\2.78\scripts\addons\blender_cloud\flamenco\sdk.py", line 28, in <listcomp> for varname, platform_replacements in sorted(items, key=by_length)] KeyError: 'win32' ``` **Possible fix** In sdk.py after line 26, add: ``` if sys.platform == 'win32': platform = 'windows' ``` In sdk.py, replace line 46 with: ``` return replacement_root.as_posix() + relpath.as_posix() ``` **Exact steps for others to reproduce the error** - Apply fix described [here ](https://developer.blender.org/T52161) - Configure Blender Cloud Add-on (select Manager, Project, as well as Storage and Output directories) - Save startup scene in Flamenco Project directory - In Render Window click Render on Flamenco

Changed status to: 'Open'

Changed status to: 'Open'

Added subscriber: @stevygee

Added subscriber: @stevygee

Added subscribers: @fsiddi, @dr.sybren, @Sergey

Added subscribers: @fsiddi, @dr.sybren, @Sergey

@fsiddi or @dr.sybren, mind having a look here?

@fsiddi or @dr.sybren, mind having a look here?

Changed status from 'Open' to: 'Resolved'

Changed status from 'Open' to: 'Resolved'
Sybren A. Stüvel self-assigned this 2017-08-08 14:30:17 +02:00

Fixed in 8d405330eeb33 and released in 1.7.3 this morning.

Fixed in 8d405330eeb33 and released in 1.7.3 this morning.

Well, the win32-issue is fixed. Please don't report two separate issues in one ticket, it makes the ticket status murky.
I don't see any error in the code in sdk.py:64 regarding the path concatenation, so please provide an example that only shows this error (and not the KeyError).

Well, the `win32`-issue is fixed. Please don't report two separate issues in one ticket, it makes the ticket status murky. I don't see any error in the code in `sdk.py:64` regarding the path concatenation, so please provide an example that only shows this error (and not the `KeyError`).

Changed status from 'Resolved' to: 'Open'

Changed status from 'Resolved' to: 'Open'

Yes I can confirm that the KeyError is fixed, thank you!
On sdk.py:54, there is no error, I'm just seeing on Flamenco server that the variables don't get added to the path:
/2017-08-08-213732.175573-stefan.grassberger-test2.flamenco/test2.flamenco.blend
when I think it should be
{job_storage}/2017-08-08-213732.175573-stefan.grassberger-test2.flamenco/test2.flamenco.blend

Yes I can confirm that the `KeyError` is fixed, thank you! On `sdk.py:54`, there is no error, I'm just seeing on Flamenco server that the variables don't get added to the path: `/2017-08-08-213732.175573-stefan.grassberger-test2.flamenco/test2.flamenco.blend` when I think it should be `{job_storage}/2017-08-08-213732.175573-stefan.grassberger-test2.flamenco/test2.flamenco.blend`

This simply means that the replacement root is empty. Can you give me concrete steps on how to reproduce this issue? Be sure to include your flamenco-manager.yaml file contents too (except the manager ID / auth token, of course).

This simply means that the replacement root is empty. Can you give me concrete steps on how to reproduce this issue? Be sure to include your flamenco-manager.yaml file contents too (except the manager ID / auth token, of course).

Changed status from 'Open' to: 'Archived'

Changed status from 'Open' to: 'Archived'

Closing due to inactivity.

Closing due to inactivity.
Sign in to join this conversation.
No Milestone
No project
No Assignees
3 Participants
Notifications
Due Date
The due date is invalid or out of range. Please use the format 'yyyy-mm-dd'.

No due date set.

Dependencies

No dependencies set.

Reference: blender/blender-addons#52174
No description provided.