Code Monkey home page Code Monkey logo

cordrapy-rdf's Introduction

  • ๐Ÿ‘‹ Hi, Iโ€™m @SvenPVoigt
  • ๐Ÿ‘€ Iโ€™m interested in ...
  • ๐ŸŒฑ Iโ€™m currently learning ...
  • ๐Ÿ’ž๏ธ Iโ€™m looking to collaborate on ...
  • ๐Ÿ“ซ How to reach me ...

cordrapy-rdf's People

Watchers

 avatar  avatar

Forkers

skoskey

cordrapy-rdf's Issues

Types other than person throw errors

dataset.add('Material', properties = {})

throws this error


HTTPError Traceback (most recent call last)
/var/folders/13/bq_w7k_x1yxcrn8djl3fkqlr0000gn/T/ipykernel_16162/3736735015.py in
----> 1 dataset.add('Material', properties = {})
2 dataset.cordraObjects

~/Desktop/TEst/te/lib/python3.9/site-packages/cordra/dataset.py in add(self, name, properties, payloads)
23 properties.update({"@id": str(uuid4())})
24 obj = self.classes[name](properties=properties, payloads=payloads)
---> 25 r = self.client.create(obj.properties, obj.properties["@type"], payloads=obj.payloads)
26 obj.properties["@id"] = r["@id"]
27 self.cordraObjects.append(obj)

~/Desktop/TEst/te/lib/python3.9/site-packages/cordra/cordraClient.py in create(self, obj, obj_type, **kwargs)
107 params.update(kwargs)
108
--> 109 return create_object(obj_json=obj, obj_type=obj_type, **params)
110
111

~/Desktop/TEst/te/lib/python3.9/site-packages/cordra/cordraMethods.py in create_object(host, obj_json, obj_type, handle, suffix, dryRun, username, password, token, verify, full, payloads, acls, **kwargs)
109 if acls:
110 params['full'] = True
--> 111 obj_r = check_response(
112 requests.post(
113 endpoint_url(host, objects_endpoint),

~/Desktop/TEst/te/lib/python3.9/site-packages/cordra/cordraMethods.py in check_response(response)
24 except BaseException:
25 print(response.text)
---> 26 response.raise_for_status()
27 return None
28 else:

~/Desktop/TEst/te/lib/python3.9/site-packages/requests/models.py in raise_for_status(self)
951
952 if http_error_msg:
--> 953 raise HTTPError(http_error_msg, response=self)
954
955 def close(self):

HTTPError: 400 Client Error: Bad Request for url: https://dev.materialhub.org/objects/?type=CreativeWork&type=mat%3AMaterial

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.