python-pyodata icon indicating copy to clipboard operation
python-pyodata copied to clipboard

How to connect ulr with special characters

Open maciekwolus opened this issue 3 years ago • 1 comments

Hi,

I want to connect the URL with the expanded version of an object. For the object, I used a line like this and it worked:

self.serviceSession.entity_sets.ServiceRequestCollection.get_entities()

Now the object name is not "ServiceRequestCollection". It's now "ServiceRequestCollection?$expand=ServiceRequestAttachmentFolder" and it doesn't work that way. Is there a possibility to download expanded files using pyodata?

Thanks

maciekwolus avatar Aug 05 '22 13:08 maciekwolus

Hi @maciekwolus.

I am sorry, but the provided info is so scarce and so confusing that I cannot find anything actionable, nor even properly understand the question. What exact problem you have?

  • start with docs around querying trough Navigational properties - https://github.com/SAP/python-pyodata/blob/master/docs/usage/querying.rst#get-a-count-of-entities-via-navigation-property
  • also. check this unit test for expanded queries. Does it solve your question?
  • If not, please provide metadata file and post sample code reproducing the bug. Test first that the your expected URL works correctly, then provide actual and expected.
  • You can either post it here to the issue or create a pull request to this repository https://github.com/phanak-sap/pyodata-issue-files
  • with failing python code where I can start with debugger, the question will become better and much more specific :)
  • I totally don't understand the "Is there a possibility to download expanded files using pyodata?" sentence. Maybe yes, maybe not, I don't know nothing about the structure of your service and the ServiceRequestCollection or ServiceRequestAttachmentFolder data in responses. But if the file is provided as stream, there may be a problem - see enhancement https://github.com/SAP/python-pyodata/issues/164.

phanak-sap avatar Aug 07 '22 18:08 phanak-sap

Closing for no response from issue author, if still valid, please re-open with more information as described in my previous comment.

phanak-sap avatar Aug 28 '22 11:08 phanak-sap