-
-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Update dataset repo to version 1.0 #8
Conversation
Turns out, you can't. Datasets should always be inside a dataset group object.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, few suggestions, and some styling issues.
Updated the dataset file to pep8 style @J535D165 |
@J535D165 ASReview still has a problem handling local files I think: ERROR:root:<urlopen error unknown url type: c> Moreover, the code for the filepath is currently; filepath=str(Path(Path(__file__).parent,
'data',
'your_dataset.csv')), I think being able to give a path instead of a str would be optimal. Giving a path results in: ERROR:asreview.webapp.start_flask:Exception on /api/datasets [GET]
Traceback (most recent call last):
File "C:\Users\5927226\AppData\Local\Programs\Python\Python39\lib\site-packages\flask\app.py", line 2077, in wsgi_app
response = self.full_dispatch_request()
File "C:\Users\5927226\AppData\Local\Programs\Python\Python39\lib\site-packages\flask\app.py", line 1525, in full_dispatch_request
rv = self.handle_user_exception(e)
File "C:\Users\5927226\AppData\Local\Programs\Python\Python39\lib\site-packages\flask_cors\extension.py", line 165, in wrapped_function
return cors_after_request(app.make_response(f(*args, **kwargs)))
File "C:\Users\5927226\AppData\Local\Programs\Python\Python39\lib\site-packages\flask\app.py", line 1523, in full_dispatch_request
rv = self.dispatch_request()
File "C:\Users\5927226\AppData\Local\Programs\Python\Python39\lib\site-packages\flask\app.py", line 1509, in dispatch_request
return self.ensure_sync(self.view_functions[rule.endpoint])(**req.view_args)
File "C:\Users\5927226\AppData\Local\Programs\Python\Python39\lib\site-packages\asreview\webapp\api.py", line 291, in api_demo_data_project
response = jsonify(payload)
File "C:\Users\5927226\AppData\Local\Programs\Python\Python39\lib\site-packages\flask\json\__init__.py", line 301, in jsonify
f"{dumps(data, indent=indent, separators=separators)}\n",
File "C:\Users\5927226\AppData\Local\Programs\Python\Python39\lib\site-packages\flask\json\__init__.py", line 131, in dumps
return _json.dumps(obj, **kwargs)
File "C:\Users\5927226\AppData\Local\Programs\Python\Python39\lib\json\__init__.py", line 234, in dumps
return cls(
File "C:\Users\5927226\AppData\Local\Programs\Python\Python39\lib\json\encoder.py", line 199, in encode
chunks = self.iterencode(o, _one_shot=True)
File "C:\Users\5927226\AppData\Local\Programs\Python\Python39\lib\json\encoder.py", line 257, in iterencode
return _iterencode(o, 0)
File "C:\Users\5927226\AppData\Local\Programs\Python\Python39\lib\site-packages\flask\json\__init__.py", line 50, in default
return super().default(o)
File "C:\Users\5927226\AppData\Local\Programs\Python\Python39\lib\json\encoder.py", line 179, in default
raise TypeError(f'Object of type {o.__class__.__name__} '
TypeError: Object of type WindowsPath is not JSON serializable
ERROR:root:Object of type WindowsPath is not JSON serializable |
This PR will update the template to version 1.0, and test it's functionality.