Assertion Failed for catalog.createKeyword

I am new to develop on the Lightroom SDK and trying to create a script to add keywords to a catalog.  Here is the content of the current script:

local LrApplication = import "LrApplication".

local LrDialogs = import "LrDialogs".

local catalog = LrApplication.activeCatalog)

GKMenuItem = {}

function GKMenuItem.runProcess)

Catalog: withWriteAccessDo ("SetKeywords", GKMenuItem.setKeywords ())

end

function GKMenuItem.setKeywords)

local test = "Default".

local catPhotos = catalog.targetPhotos

local myKeyword = catalog.createKeyword (' ANU: test ', {}, true, Nile)

for ______, make photo in ipairs (catPhotos)

-Loop on each photo.

-photo.setKeyword (myKeyword)

LrDialogs.message (test)

end

end

import "LrTasks".startAsyncTask (GKMenuItem.runProcess)

The problem I have is that I get a message "Assertion failed!" for the instruction of createKeyword each time it is executed.   I tried many variations, without success.  Using Lightroom on OSX Lion 10.7.4 3.6.

Any ideas would be appreciated!

Thank you

Glyn

catalogue:createKeyword no catalogue. createKeyword

(colon, no dowry)

Tags: Photoshop Lightroom

Similar Questions

  • Why do I get an "internal error", just "Assertion failed" when calling createKeyword

    Here is my code.  It is called within a function that runs under LrTasks.startAsyncTask.  Calls to "Util.writeLog" confirm this createKeyword is called and never returns.

    () Util.Catalog:withWriteAccessDo

    "CreateKwUnderPerson,"

    function()

    Util.writeLog ('the call' createKeyword()'"")

    AKW = Util.catalog:createKeyword (name, {}, true, Nile, true)

    Util.writeLog ("'createKeyword"returned"()")

             end

    )

    I find it disconcerting that there is no more informative error message.   This seems to be a bug to Adobe, even if the problem where probably something I am doing wrong.

    The following text runs very well:

      catalog:withWriteAccessDo ("CreateKwUnderPerson", function()
          name = "test123"
          akw = catalog:createKeyword (name, {}, true, nil, true)
          end)
    

    However, if instead of the 'name' is assigned null, it then produces ' assertion failed!  So, check that the 'name' is a string.

    In addition, you use a debugger, for example, my toolbox for debugging or the IDE debugger described in another thread here?  They both take awhile to hang at the start, but they will save you a lot of time on the road, given the nature of Lua.

  • Cannot install Need For Speed: Shift 2 Microsoft Visual C++ Runtime Library Assertion failed!

    Original title: MsiExec install problem.

    ---------------------------
    Microsoft Visual C++ Runtime Library
    ---------------------------
    The assertion failed!

    Program: C:\WINDOWS\system32\MsiExec.exe
    File:.\CaCheckDiskSpace.cpp
    Online: 293

    Expression: 0

    For more information on how your program can cause an assertion
    failure, see the Visual C++ documentation on asserts

    (Press Retry to debug the application - JIT must be enabled)
    ---------------------------
    Abort Retry Ignore
    ---------------------------

    I am trying to install the new Need For Speed: Shift 2 and what is happening.

    What should I do?... I checked the installation on other computers, and it works, it's just my computer I guess.

    Thanks in advance ():

    Click on the link below to view the titles of Need for Speed that show to be compatible with Windows 7. It may not be a list complete, so you need to check on the manufacturer's website.

    http://www.Microsoft.com/Windows/compatibility/Windows-7/en-us/search.aspx?l=en-us&type=software&s=need%20For%20Speed%3A%20Shift%202&page=1

    If it is not compatible, you can try and do a right click on the seutp.exe or .msi and select 'run as administrator '.

    If the program is not compatible, then you try to install and run the program in compatibility mode.
    Use the following steps:
    (1) right click on the program
    2) click Properties
    3) click on the Compatibility tab
    (4) select run this program in compatibility mode and select Windows Vista or other operating system, the program has been run successfully.

    Check out the link here: make sure to run older programs in this version of Windows
    http://Windows.Microsoft.com/en-us/Windows7/make-older-programs-run-in-this-version-of-Windows

    If you are running Windows 7 Professional or Ultimate version, install Windows Virtual PC and Windows XP mode (http://www.microsoft.com/windows/virtual-pc/default.aspx) and run your software in Windows XP.

    If you run Windows 7 Home Premium, you cannot run Windows XP mode, but you can try VirtualBox (www.virtualbox.org) or VMware Player (www.vmware.com), or any other 3rd party software virtualization and install a separate copy of Windows XP (family or professional edition) for this purpose. You can find the virtualization software free that will run on Windows 7 Home Premium.

    I hope this helps.

    Marilyn

  • Catalog object privilege validation failed for the user.

    Hello
    I'm getting following error after adding HTML tags in 11g dashboard.
    How to set privileges?... Kindly let me know. Thank you.

    The error massage:
    Catalog object privilege validation failed for path/users/User1/_portal/page 1 user.
    Currently you do not have sufficient privileges to save a report page or dashboard that contains the HTML markup. Dashboard contains HTML tags customized for static text.

    Hi user,

    Go to settings-> directors-> Manage privileges-> "answers".

    Here you can see - 'Save content with HTML markup' next to it, you will see "presentation server administrators.
    Click on it and change it to "Everyone."

    And save the changes. Restart the BI Services now, you can add the content and it will not error messages appear.

    Thank you.

    Reward points and close the response unit to help others with the same question :)

  • File crash - "Assertion failed" error - help!

    One of my folders, my video folder, my computer crash.

    I can access the files in the folder to open it, but I must be very quickly understood Windows Explorer stops and restarts.

    the error message is:

    Microsoft Visual C ++ runtime library
    The assertion failed!
    Program C:\Windows\explorer.exe
    File:... / External/boost_1_31_0\boost/shared_ptr. HPP
    Line 254

    Expression: px! = 0

    I used the File Checker system to search for or corrupt Vista files that can cause the problem according to this method, but he found nothing

    http://support.Microsoft.com/kb/936212

    When I copy the contents of the entire folder to a new folder I get the same error message

    Thanks in advance.

    Hello scoobiesnacks,

    I did several searches on the error message that you have published in your initial post, looks like what you are experiencing is the result of an infection spyware or malicious software.  If it won't be too much a problem, I suggest that you back up all your files

    1. try to repair Vista with the installation CD/DVD How to use the Startup Repair tool

    2. If this does not work, do a clean install http://support.microsoft.com/default.aspx/kb/918884

    David O
    Microsoft Answers Support Engineer
    Visit our and tell us what you think.

  • Igfxsrvc.exe error Debug Assertion failed

    Original title: Debug Assertion Failed!  All of a sudden this started and causes screen to spoil and PC crashes.  Help, please!

    I don't know if this had nothing to do with my problem, but here goes.  2 things:

    1. I uninstalled Norton after 1 year and paid for Bitdefender and installed later.  A week before point 2 has arrived.
    2. I have connected my laptop to my TV via HDMI, and that seems to be the problem at startup.  Minutes later - if I remember correctly.  I got a blue screen mentioning a problem of bios or something, there are no on-screen long for me to write it, but he came twice a day and twice a few days later.  Maybe I changed some settings but I do not remember.
    Now after about 20-30 minutes, my computer slows down slightly, then computer laptop screen goes black, then the report of the screen decreases, internet goes out, and this Debug Assertion error arises, here's what he says:
    Debug Assertion Failed!
    Program: C:\Windows\system32\igfxsrvc.exe
    File:.\igfxsrvc.cpp
    Online: 170
    Expression: MANAGED (HRS)
    For more information on how your program can cause an assertion...
    As I mentioned earlier, I remember that my screen went blue and gave me a Bios error or a problem with Bios of some sort.  However, who has not reappeared in almost 2 weeks now.
    I'll gladly provide any other information you need.  Help, please!
    Thank you
    Chris

    Hello

    igfxsrvc.exe is a process associated with Intel Common User Interface from Intel Corporation. It is installed with the graphic card drivers with the Intel chipsets. This program is important for the stable and safe running of your computer and should not be terminated.

    I suggest you install the latest video driver from the manufacturer of the system.

    See the links below for more details on the update of drivers:

    Updated a hardware driver that is not working properly
    http://Windows.Microsoft.com/en-us/Windows7/update-a-driver-for-hardware-that-isn ' t-work correctly

    Update drivers: recommended links
    http://Windows.Microsoft.com/en-us/Windows7/update-drivers-recommended-links

    Intel Download Center

    http://Downloadcenter.Intel.com/

    Also run the:

    Open the troubleshooter of Performance

    http://Windows.Microsoft.com/en-us/Windows7/open-the-performance-Troubleshooter

  • Microsoft Visual C++ Runtime Library Assertion failed! File: common\npn_gate.cpp Expression: pPluginshims

    Microsoft Visual C++ Runtime Library Assertion failed! File: common\npn_gate.cpp Expression: pPluginshims

    Thread double additional information form:

    using windows 7 ultimate

    get Microsoft visual c ++ runtime library assertion failure message received the file: common\npn_gate.cpp line Expression 267: pPluginshims. This happens when you use Mozilla firefox only.

    Hi eager T.Kelati,.

    ·         Have you tried using Internet Explorer and check?

    ·         You did changes to the computer before the show?

    I suggest you perform the clean boot and check if the problem persists.

    Place the computer in a clean boot state, then check if it helps. You can start Windows by using a minimal set of drivers and startup programs. This type of boot is known as a "clean boot". A clean boot helps eliminate software conflicts.

    How to troubleshoot a problem by performing a clean boot in Windows Vista or in Windows 7

    http://support.Microsoft.com/kb/929135

     

    Note: After troubleshooting, be sure to configure the computer to start as usual as mentioned at step 7 of the article mentioned above.

    You can also see the following article for more information on the runtime error:

    What is a runtime error?

    http://Windows.Microsoft.com/en-us/Windows7/what-is-a-runtime-error

    If the question is limited to Mozilla Firefox, then it would be best to seek their support.

    Support for Mozilla Firefox

    http://support.Mozilla.org/en-us/questions/new

    Let us know the results.

  • Internal error when calling "catalog: createKeyword.

    Hi all

    I'm in the decision to make the migration process in Lightroom. An important aspect is that I'm able to import my existing keywords to my photos (currently in ACDSee) somehow. I managed with the easy part already: conversion of categories in a text format based on TABS and import it as keywords in Lightroom.

    Now, I want to associate images with the keywords already imported. The following thread led me to a speed very quickly: http://adobe.hosted.jivesoftware.com/thread/1033982?tstart=0

    But now I am somehow hit. I can get the keyword root directly, and I am also able to get her children. Unfortunately, whenever I call createKeyword with a parent I got the following error message:

    "An internal error has occurred:?: 0: attempt to index a nil value.

    Any ideas what could be the cause?

    Here's the script, by encapsulating the problem, if it helps:

    local LrDialogs = import 'LrDialogs'
    local LrApplication = import 'LrApplication'
    local catalog = LrApplication.activeCatalog()
    
    
    MyMenuItem = {}
      
    function MyMenuItem.runProcess()
        catalog:withWriteAccessDo("setKeywords", MyMenuItem.setKeywords)
    end 
    
    function MyMenuItem.setKeywords()             
              local targetPhotos = catalog:getTargetPhotos() 
              if targetPhotos ~= nil and #targetPhotos > 0 then 
                        -- LrDialogs.message(#targetPhotos)
              else
                        LrDialogs.message( "No target photos." )
                        return
              end 
    
    
              -- ( keywordName, synonyms, includeOnExport, parent, returnExisting )
              local myRootKeyword = catalog:createKeyword( 'People', nil, true, nil, true ) 
              if myRootKeyword ~= nil then
                        LrDialogs.message(myRootKeyword:getName())
              else
                        LrDialogs.message( "Keyword has not been returned." )
                        return
              end
      
              local childs = myRootKeyword:getChildren()
              for i,child in ipairs( childs ) do
                        LrDialogs.message(child:getName())
              end
              -- Shows Friends, Others, ...
      
              LrDialogs.message( "createKeyword is about to be called" ) 
      
              -- Crashes after this line "An internal error has occurred: ?:0: attempt to index a nil value"
              local mySecKeyword = catalog:createKeyword( 'Friends', nil, true, myRootKeyword, true )
              if mySecKeyword ~= nil then
                        LrDialogs.message(mySecKeyword:getName())
              else
                        LrDialogs.message( "Keyword has not been returned." )
                        return
              end
    end
    
    
    import 'LrTasks'.startAsyncTask( MyMenuItem.runProcess )
    
    
    
    
    

    Thanks for the advice in advance.

    Kind regards

    Thorsten

    Ah, the problem is that you try to call myRootKeyword:getName() before leaving the catalog:withWriteAccessDo ().  The doc of catalogue: createKeyword() says:

    Must be called in one of the with__WriteAccessDo doors. The new keyword is not available for access until that function returns.

    If instead, you restructure your code like this:

    local myRootKeyword
    catalog:withWriteAccessDo("setKeywords", function ()
        myRootKeyword = catalog:createKeyword( 'People', {}, true, nil, true )
        end)
    

    It works very well.

    Furthermore, your "Accidents After this line" comment was wrong.  I suggest to you that use debugging tools, which will make it much faster to identify your bugs. It will take time to hang it to the top of the first, but he will pay fairly quickly.

  • Photosmart Premium C410: C410 Software Installation fails for not having not supported USB, Win7 Pro

    I just got a laptop HP ProBook G3 450 with Windows 7 Pro 64 bit. I'm unable to install the Photosmart C410 series software and it fails when checking the system requirements, saying the USB hardware and necessary drivers are not present.  I tried with and without a USB cable installed and also tried to disable the security firewall. It fails for the same when USB problem only connected via WiFi. The discoveries of software troubleshooting HP Print and Scan doctor that the software is not fully installed, for example, without help.  I can connect to the printer and print a test page using my WiFi network using a web browser, and I managed to install it on two other portable Win7 in the past.

    Hello
    Click the Start button and type folder in the search bar, then open the Temp folder indicated.

    Open the last HP installation folder that begins with 7z (e.g. 7zs1234)
    Open the installation folder.
    Find the file usbready.exe and rename it to usbready.old.exe
    Navigate to the main extraction folder (folders that begins with 7z) and run the Setup.exe file.

    Now follow the installation and check for the difference.

    Kind regards
    Shlomi

  • Online and automated phone activation fails for XP Home

    Activation fails for me for Windows XP Home Edition, after changing a lot of material. Online activation failed. I called the automatic activation phone number where I give them a "ID of Activation" appears on my screen and I like that it is not valid. Microsoft support site sends me to a web page that sends me to a web page that sends me to the first web page.

    How do I get this active?

    How to activate Windows 7 manually (activate by phone)

    1) click Start and in the search for box type: slui.exe 4

    (2) press the ENTER"" key.

    (3) select your "country" in the list.

    (4) choose the option "activate phone".

    5) stay on the phone (do not meet all the automatic guests) and wait for a person to help you with the activation.

    (6) explain your question clearly to the support person.

  • Windows Update fails for XP and Office 2003 security updates others are OK. Error message is 0x800F0102.

    Windows Update fails for XP and Office 2003 security updates others are OK. Error message is 0x800F0102.

    Ref: http://answers.microsoft.com/en-us/windows/forum/windows_other-windows_update/error-code-0x800f0102/eefc1d5a-2f89-4676-82fb-1d76debbd13f

    Start with these troubleshooting steps and post returns with the requested info and arises from the troubleshooting.

    Clean boot your PC, and then run Windows Update.

    Reset the Windows Update components

    Perform operations of KB883825

  • Windows update fails for KB2661637; KB2647516 and KB2660465

    Windows update fails for KB2661637; KB2647516 and KB2660465 - I ran MicrosoftFixit.wu.Run and get the same results.   Help, please... thnx

    Hi SparkySA,

    Follow the steps in the article.

    Cannot install Windows updates

    You cannot install some programs or updates

  • How can I fix a message on screen ASSERT FAILED\

    THIS MESSAGE IS DISPLAYED WHEN I BOOT XP

    ASSERT FAILED\projects\wtKernel\scr\win32\core\cmcodemodule.cpp:90m_code handle! = NULL

    Hi GraemePippen,

    ·         Did you do changes on the computer before the show?

    ·         What is the full error message?

    Follow these steps:

    Step 1: Start the computer in safe mode and check if the problem persists.

    A description of the options to start in Windows XP Mode

    http://support.Microsoft.com/kb/315222

    Step 2: If the problem does not still in safe mode, perform a clean boot to see if there is no conflict of software like clean boot helps you eliminate software conflicts.

    How to configure Windows XP to start in a "clean boot" State

    http://support.Microsoft.com/kb/310353

    Note: After completing the steps in the clean boot troubleshooting, follow the section How to configure Windows to use a Normal startup state of the link to return the computer to a Normal startupmode.

    After the clean boot used to resolve the problem, you can follow these steps to configure Windows XP to start normally.

    (a) click Start, run.

    (b) type msconfigand click OK.

    (c) the System Configuration Utility dialog box appears.

    (d) click the general tab, click Normal startup - load all services and device drivers and then click OK.

    (e) when you are prompted, click on restart to restart the computer.

  • Could not open the zone alarm file:Validation failed for c\windows\system32\zpeng25.dll.

    All of a sudden I can't activate my zone alarm service, because I gives me a message that the Validation failed for c\windows\system32\zpeng25.dll.  After you receive this message, I ran software to fix registry errors, but that has not fixed the problem.  I am able to follow the explicit instructions so careful instructions are given.  Thank you for your help.

    Do Zone Alarm support say when contact you? What responses did you get when you posted in their forums?
    http://forums.ZoneAlarm.com/index.php

  • X 3500 HNAP call to the device failed for an unknown reason.

    During the installation process Cisco Connect X 3500 briefly to connect to internet (can surf the net very briefly in this window) but when he arrives at the end of the installation it saying unsuccessful then restarts.  Is there a way to manually connect just using the address IP is a browser?

    Error code: 82BD0305

    Error description: year HNAP call to the device failed for an unknown reason.

    Model name: loading...

    Model number: X 3500

    Serial number: unknown

    Firmware version: loading...

    Operating system: Windows 7 SP 1

    Software version: 1.4.12340.0

    Connection type (WAN): loading...

    (LAN) IP address: loading...

    (WAN) IP address: loading...

    The computer IP address: 192.168.1.103

    Found!  At the bottom of the Cisco Connect program window is a link to configure manually via a web browser.

Maybe you are looking for

  • How to replace RAM on Satellite 2450?

    I own a Satellite 2450-201 and want to upgrade the Ram. The only problem is to know how to access. Anyone know?

  • Satellite A300 restart when it is plugged power

    Hi allI see some of these problems arise in the forums and I was wondering if anyone has a solid answer as to if this is fixable or is the laptop useless now. Satellite A300No error log display software errors.Error recovery reports an unexpected shu

  • Compaq Presario SG2025IL: updating graphics card

    I have a Compaq Presario SR2025IL, which was used a computer to type. Now, he was bequeathed to me and I want to update its graphics to make a gaming computer. Any suggestions for a graphics card?

  • Satellite A30 stops due to overheating

    My Satellite A30 cutout due to overheating.The cooling fans are free of dust.I put the Max-performance cooling.Is there another reason of overheating?

  • old tower top system restore caused windows real probs

    I have an old laptop that I would give to be used for the study, it has not yet turned on for at least 2 years. When I turned it on it was beautiful, slow but no probs, so I thought I'll do a system restore and bring it in when it was first bought so