Coder Social home page Coder Social logo

Comments (4)

davidfokkema avatar davidfokkema commented on June 12, 2024

It should, indeed. It used to be the case that a default, empty, DetectorHisparc object would be created when the station was created in inforecords. The /usr/local/hisparc-update script running daily on pique (source in examples/django-cron.py in the publicdb tree) updates all DetectorHisparc objects with the latest GPS positions. However, that object needs to exist.

from publicdb.

153957 avatar 153957 commented on June 12, 2024

So the question is why were those DetectorHisparc objects not created, I noted that some other stations also do not have a corresponding DetectorHisparc object.
For now we can manually create them for those stations which do not have it, since it won't be generated automatically because the stations already exists.

from publicdb.

153957 avatar 153957 commented on June 12, 2024

This is the reason that jsparc would not work when trying to retrieve data for newer stations, they did not have an entry in DetectorHisparc, causing the retieval of the gps information to fail in django_publicdb/jsparc/views.py at
d = s.detectorhisparc_set.all().reverse()[0]. Causing an IndexError which is not caught.

from publicdb.

davidfokkema avatar davidfokkema commented on June 12, 2024

I've checked the code. The DetectorHisparc object is never created, nor referenced. The wizards would've taken care of that. I suggest that for now, the objects need indeed manually be created when a station is created. Later, a rewrite of inforecords should take care of this.

from publicdb.

Related Issues (20)

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.