0

I am trying to add new to perforce. I getting error as below

[Error]: "Null directory (//) not allowed in '//workspaceXXXX//xxxx.txt'."

What i am doing:

1) I create a workspace

self.p4.client = "workspaceXXXX"
client = self.p4.fetch_client("workspaceXXXX")
client._root = "../temp/"workspaceXXXX""
depotPath = "//TEAM/PATH_1/PATH_2/2018-Aug-06/..."
wsPath = "//workspaceXXXX/..."
client._view = [depotPath+" "+wsPath] 
"""Create a workspace"""
self.p4.save_client(client)

2) Place the new in the workspace

3) Add file

self.p4.run("add", "//TEAM/PATH_1/PATH_2/2018-Aug-06/xxxx.txt")

While adding file i encounter the above error. What am i doing wrong here.

Rachan R K
  • 211
  • 2
  • 13
  • I think something got changed in the process of obfuscating your example -- the error references a client path, but you ran the command with a depot path. – Samwise Dec 26 '18 at 17:18
  • Generally speaking, the "null directory" error means you constructed a bad path, sometimes due to either redundant or missing `/` characters in the client view. I don't see any such mistakes in your obfuscated example, but I'm betting your real code has a typo. – Samwise Dec 26 '18 at 18:11
  • @SamStafford i use almost the same code for check-in of edited file(file already in depot). Only change while creating workspace is, syn after self.p4.save_client(client) i.e self.p4.run_sync(depotFilePath) – Rachan R K Dec 27 '18 at 03:22
  • @SamStafford yes >/ was missing in depotPath. In actual code it is dynamic value. Debugged the code properly found the problem. Thank you. – Rachan R K Dec 27 '18 at 04:15

0 Answers0