[VX] Can't get character_name for page graphic

I have a script that looks something like this:

Code:
graphic = page.graphic
p graphic.character_name
p graphic.character_index
p graphic.direction
p graphic.pattern

When it runs, the output for character_index, direction and pattern are all correct, but the character_name is always blank. This is the case for every event that uses a character sheet, on every map, even though the correct graphic is actually shown.

The help file says character_name is the correct attribute, and if it wasn't correct I'd be getting an error when it runs.

Any idea what's going on?
Where are you running the script from?
It's a new script I'm writing that runs before main. I have loaded the map and the page variable correctly contains all the data in the event page. I am able to see all of the other page conditions and settings - it's just the spritesheet name that seems to be null, even though I know it's not.

All of this info is being retrieved successfully:
Code:
================================================================================
== EVENT 10 - EV010 @ 35, 11                                                  ==
================================================================================

--------------------------------------------------------------------------------
-- Page 1                                                                     --
--   Graphic:                                                                 --
--     Index 6; Facing down; Pattern 0                                        --
--   Movement: custom                                                         --
--     Speed: 4 - normal                                                      --
--     Frequency: 5 - highest                                                 --
--   Walking Animation ON                                                     --
--   Priority: above characters                                               --
--   Trigger: player touch                                                    --
--------------------------------------------------------------------------------

--------------------------------------------------------------------------------
-- Page 2                                                                     --
--   Condition: Self Switch A is ON                                           --
--   Graphic:                                                                 --
--     Index 0; Facing down; Pattern 0                                        --
--   Movement: fixed                                                          --
--   Walking Animation ON                                                     --
--   Through ON                                                               --
--   Priority: below characters                                               --
--   Trigger: action button                                                   --
--------------------------------------------------------------------------------
That is weird. I don't have a copy of VX handy to check it out, but I would have expected that print to display the right value as well.

Does it still do it if you use "puts" rather than "p"?
puts does the same thing

I have the Steam version of VX, and it's set to auto-update.

Edit: never mind - it's one of those ID10T errors

Earlier in the code:
Code:
    return false if graphic.tile_id != 0 || graphic.character_name = '' ||
      (list.nil? && list.size > 1)

Original thread: https://forums.rpgmakerweb.com/threads/vx-cant-get-character_name-for-page-graphic.134803/