Skip to content

lightingManager.py not loading .json correctly #2

Open

Description

@ukkodesign

Received the following error when loading the .json file in Maya2019 (Product version: 2019.0.0.F) from C:/Users/<user>/Documents/maya/lightManager\lightFile_0916.json

# Traceback (most recent call last):
#   File "C:/Users/oleu/Documents/maya/2019/scripts\lightingManager.py", line 178, in importLights
#     self.setButtonColor()
# AttributeError: 'NoneType' object has no attribute 'intensity'

.json extendson changed to .txt
lightFile_0916.txt

I coded along with the videos and had no errors up until video "69. Importing Our Lights".
Went back and checked my code against yours. Still didn't work. I loaded your example file and the same error was returned.
Not sure if its something that's changed in Maya 2019 or Python/ PyMel/ Qt/ etc. syntax, or if it's a system specific/ user error (probably the later).
Thanks!

Activity

  1. dgovil commented on Sep 17, 2019

    @dgovil
    Owner

    The error seems to be coming from when the code tries to set the light intensity and for some reason the light object doesn't have an intensity attribute.

    After creating the light, can you print out the light and also type(light) to see what you get back?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions