search cancel

MSP Error "An import error occurred" due to Task Name issue

book

Article ID: 189603

calendar_today

Updated On:

Products

Clarity PPM On Premise Clarity PPM SaaS

Issue/Introduction

A project manager is getting the following XML error on one of their projects when opening it in Microsoft Project: 

An import error occurred. 
The element <Name> in the <Task> element with <UID> = 0 has invalid data. 

The error seems to be referring to a specific task name, but how do we determine which task is the one with the issue?

Cause

The error message is being thrown because it can't translate a character in name. In this example, its the character: &#x0009. This character corresponds to the TAB key. Neither MSP or Clarity can directly accept the TAB key in the name field, so the project manager most likely copied it over from some place else.

To find the task with the invalid data in the Name field:

  1. Open the corresponding project XML and search for the first instance of the <Task> tag.(This is the beginning of the task section in the XML).
  2. Then from here, look for the task having the UID mentioned in the error message. In this example: <UID>0</UID>.
    • Note: Each item in the XML has a corresponding UID. For tasks, they are assigned a UID based on where they are on the project plan. The first task on the xml will be the 'Project Summary Task' and this task gets assigned a UID of 0. This task does not necessarily exist in Clarity, so when the project is opened in MSP, MSP populates this project level task with the project name. )
  3. Once the task with the UID mentioned in the error message is found, look for the <Name> field within it. This contains the invalid data. 


<Task>
      <Manual>0</Manual>
      <PercentComplete>0.000000</PercentComplete>
      <UID>0</UID>
      <WBS>0</WBS>
      <Active>1</Active>
      <OutlineNumber>1</OutlineNumber>
      <ID>0</ID>
      <OutlineLevel>1</OutlineLevel>
    <Finish>2020-11-11T17:00:00</Finish>
      <Priority>500</Priority>
    <Name>Test Project &#x0009;ABC&#x0009;DEF</Name>
      <IsNull>0</IsNull>
    <Start>2020-03-21T08:00:00</Start>...

Resolution

To correct the issue: Have the project manager delete the TAB and replace it with a space or another character on the project Name field in Clarity. The tab may appear to already be a normal space in the Clarity UI, but it's not based on the XML output, so we will need to delete and/or replace the 'space' anyway.

Additional Information

For steps on how to enable debugging to generate the XML, see XML, MPP and MSP Logs for Troubleshooting MSP Issues