Giter VIP home page Giter VIP logo

atuav_experimenter_platform_valuechart's Introduction

CircleCI

Web ValueCharts integration

This is an integration of the webValueCharts into the experiment platform. More information about ValueCharts can be found at the project website.

Compiling the frontend

As the frontend is written in Typescript, it must be compiled into javascript before running the webSocket application from python. Make sure to run tsc after making any frontend changes, or they will not be reflected in the application.

Running the application

To run the application, simply run python <your_experiment_file_name>.py and open localhost:8888

atuav_experimenter_platform_valuechart's People

Contributors

tiffwu1027 avatar dependabot[bot] avatar atuav avatar

Watchers

 avatar  avatar

atuav_experimenter_platform_valuechart's Issues

Joined ValueCharts cannot be viewed due to chart status issue

Seems like the chart status is inconsistent with what the actual chart status is:

in the joined section:
Screen Shot 2021-01-31 at 6 35 13 PM

The actual (since this one is owned by the current user):
Screen Shot 2021-01-31 at 6 36 13 PM

Looking at the db, seems like multiple chart statuses are being written:

> db.ValueChartStatuses.find()
{ "_id" : ObjectId("6017647bbe5ec8cdda9a85b7"), "lockedByCreator" : false, "lockedBySystem" : true, "chartId" : "6017647bbe5ec8cdda9a85b6" }
{ "_id" : ObjectId("60176583be5ec8cdda9a85b8"), "lockedByCreator" : false, "lockedBySystem" : false, "chartId" : "6017647bbe5ec8cdda9a85b6" }

Using demo valuechart sends request with undefined parameter

request: http://localhost:8888/ValueCharts/undefined/status
which then gives an error from the server, stack trace:

[E 210203 22:23:51 web:1670] Uncaught exception GET /ValueCharts/undefined/status (::1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/ValueCharts/undefined/status', version='HTTP/1.1', remote_ip='::1')
    Traceback (most recent call last):
      File "/Users/tiffany/opt/anaconda3/envs/py2/lib/python2.7/site-packages/tornado/web.py", line 1590, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      File "experimenter_platform_wvc.py", line 399, in get
        document['_id'] = str(document['_id'])
    TypeError: 'NoneType' object has no attribute '__getitem__'
[E 210203 22:23:51 web:2162] 500 GET /ValueCharts/undefined/status (::1) 4.06ms

Changing password results in 400 bad request

stacktrace:

('exception occurred ::', TypeError('replacement must be an instance of dict, bson.son.SON, or any other type that inherits from collections.Mapping',))
[W 210203 22:09:19 web:2162] 400 PUT /Users/testing (::1) 13.66ms

Trying to leave a chart I own gives me 500 error

stack trace:

[E 210203 22:17:42 web:1670] Uncaught exception DELETE /ValueCharts/601b90da9d67d614202f3480/users/testing (::1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='DELETE', uri='/ValueCharts/601b90da9d67d614202f3480/users/testing', version='HTTP/1.1', remote_ip='::1')
    Traceback (most recent call last):
      File "/Users/tiffany/opt/anaconda3/envs/py2/lib/python2.7/site-packages/tornado/web.py", line 1590, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      File "experimenter_platform_wvc.py", line 554, in delete
        json_obj = json.loads(self.request.body, object_pairs_hook=collections.OrderedDict)
      File "/Users/tiffany/opt/anaconda3/envs/py2/lib/python2.7/json/__init__.py", line 352, in loads
        return cls(encoding=encoding, **kw).decode(s)
      File "/Users/tiffany/opt/anaconda3/envs/py2/lib/python2.7/json/decoder.py", line 364, in decode
        obj, end = self.raw_decode(s, idx=_w(s, 0).end())
      File "/Users/tiffany/opt/anaconda3/envs/py2/lib/python2.7/json/decoder.py", line 382, in raw_decode
        raise ValueError("No JSON object could be decoded")
    ValueError: No JSON object could be decoded
[E 210203 22:17:42 web:2162] 500 DELETE /ValueCharts/601b90da9d67d614202f3480/users/testing (::1) 27.93ms

Trying to view existing chart results in 500 error

stacktrace:

[E 210203 22:11:20 web:1670] Uncaught exception GET /ValueCharts/hahachart?password=test (::1)
    HTTPServerRequest(protocol='http', host='localhost:8888', method='GET', uri='/ValueCharts/hahachart?password=test', version='HTTP/1.1', remote_ip='::1')
    Traceback (most recent call last):
      File "/Users/tiffany/opt/anaconda3/envs/py2/lib/python2.7/site-packages/tornado/web.py", line 1590, in _execute
        result = method(*self.path_args, **self.path_kwargs)
      File "experimenter_platform_wvc.py", line 264, in get
        if ("_id" in valueChartByName):
    TypeError: argument of type 'NoneType' is not iterable
[E 210203 22:11:20 web:2162] 500 GET /ValueCharts/hahachart?password=test (::1) 8.37ms

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.