Local work item issues with certification 3

Hi

I have been working on the certification 3 assignment and am having troubles that the created work items are now nowhere to be found. Everything looks to be ok and even logs say that items are saved correctly, but still I dont have anything in the work-items-out folder after run.

My keyword for creating an item looks like this at the momen:
Save work item payload

[Arguments]    ${payload}

Log To Console    Payload is ${payload}

Create Output Work Item

Set Work Item Variable    traffic_data    ${payload}

Log To Console    TrafficData is ${payload}

Save Work Item

Example log message from console looks like this:
Payload is {‘country’: ‘SWE’, ‘year’: 2018, ‘rate’: 3.61718}
TrafficData is {‘country’: ‘SWE’, ‘year’: 2018, ‘rate’: 3.61718}

Log file shows this:
KEYWORD RPA.Robocorp.WorkItems . Save Work Item

Documentation: Save the current data and files in the work item. If not saved, all changes are discarded when the library goes out of scope.
Start / End / Elapsed: 20220117 07:29:04.403 / 20220117 07:29:04.407 / 00:00:00.004

07:29:04.407 INFO Saved into output file: C:\Users\NA\OneDrive - ä Corporation\Documents\Robocorp_Janne\my-wdm-robot\devdata\work-items-out\run-1\work-items.json

To me, everything seems to be in place, however work-items-out folder is empty.

Hi, @kumpujanne!

That situation sounds really weird. I wonder if the directory path has something to do with it (the log output looks a bit funky):

If you paste that full path in File Explorer, does it find the file?

I edited the path a bit to exclude company. Anyways, the path itself works. I tested it by saving additional file there as part of this process.

However, when copy pasting the full path to the work item file into file explorer, it does not find anything, even though the path is correct in the logs.

I tried manually adding the run-1 folder and even the expected json file. What that did, was just that in the logs, the folder changed to run-2t, but no actual results were anywhere. Also the run-2 folder wasn’t visible in file explorer.

EDIT:
@jani
I added List directory to the key word right after Save Work Item and it appears that it doesn’t save anything.

In the log Save Work Item says:
Saved into output file: 'Robocorp_Janne\my-wdm-robot\devdata\work-items-out\run-1\work-items.json

Then next I have List directory where the run fails and in the log we I have
Directory ‘Robocorp_Janne\my-wdm-robot\devdata\work-items-out\run-1’ does not exist.

It doesnt seem to create the run-n folder nor the json.

Hi! Weird indeed. Can you share some details about your system?

  • Windows version
  • VS Code version
  • Robocorp extension version

Does this behave the same if you use something else than a OneDrive-enabled folder?

1 Like

OneDrive was indeed the issue. After copying the project to another location it started working.
I wonder why the work item lines of code didnt like OneDrive as I was able to use Onedrvive location as test purposese for Vault functionality, write other files and folders in there. Work item creation was the only thing which wasnt possible.

Anyways, thank you @jani !

1 Like