Print

Print


The problem here is that you don't specify a proper target for the destination where you would like to copy the file - therefore the undelying CopyProcess job fails. Instead of 'foo' try setting a an absolute path for example "/tmp/mydir/foo".

Then, you should check the type of response the FileSystem copy method returns. It's not a status object but a tuple with the first object in the tuple being the status object. Therefore, your code should look like:

status = myclient.copy(remote_file, '/tmp/mydir/foo', force=True)
self.assertTrue(status[0].ok)

You can always have a look at the examples that are available in the XRootD repository:
https://github.com/xrootd/xrootd/tree/master/bindings/python/examples

If you want more debug info you can run your script with debug enabled for the xrootd client like this:

XRD_LOGLEVEL=Dump python your_script.py


You are receiving this because you are subscribed to this thread.
Reply to this email directly, view it on GitHub, or mute the thread.

{"api_version":"1.0","publisher":{"api_key":"05dde50f1d1a384dd78767c55493e4bb","name":"GitHub"},"entity":{"external_key":"github/xrootd/xrootd","title":"xrootd/xrootd","subtitle":"GitHub repository","main_image_url":"https://cloud.githubusercontent.com/assets/143418/17495839/a5054eac-5d88-11e6-95fc-7290892c7bb5.png","avatar_image_url":"https://cloud.githubusercontent.com/assets/143418/15842166/7c72db34-2c0b-11e6-9aed-b52498112777.png","action":{"name":"Open in GitHub","url":"https://github.com/xrootd/xrootd"}},"updates":{"snippets":[{"icon":"PERSON","message":"@esindril in #434: \r\nThe problem here is that you don't specify a proper target for the destination where you would like to copy the file - therefore the undelying CopyProcess job fails. Instead of 'foo' try setting a an absolute path for example \"/tmp/mydir/foo\". \r\n\r\nThen, you should check the type of response the FileSystem copy method returns. It's not a status object but a tuple with the first object in the tuple being the status object. Therefore, your code should look like:\r\n```\r\nstatus = myclient.copy(remote_file, '/tmp/mydir/foo', force=True)\r\nself.assertTrue(status[0].ok)\r\n```\r\n\r\nYou can always have a look at the examples that are available in the XRootD repository:\r\nhttps://github.com/xrootd/xrootd/tree/master/bindings/python/examples\r\n\r\nIf you want more debug info you can run your script with debug enabled for the xrootd client like this:\r\n```bash\r\nXRD_LOGLEVEL=Dump python your_script.py\r\n```"}],"action":{"name":"View Issue","url":"https://github.com/xrootd/xrootd/issues/434#issuecomment-264016144"}}}

Use REPLY-ALL to reply to list

To unsubscribe from the XROOTD-DEV list, click the following link:
https://listserv.slac.stanford.edu/cgi-bin/wa?SUBED1=XROOTD-DEV&A=1