Code Monkey home page Code Monkey logo

Comments (3)

sargunv avatar sargunv commented on August 27, 2024 1

Triggering a new scan of the affected platforms fixes the bad data and resolves the error.

select json_type(json_extract(files, "$[0]")) as type, count(*)
from roms
group by type
type count(*)
null 1282
OBJECT 938

Eventually, after re-scanning all platforms, null came down to zero too:

type count(*)
OBJECT 2220

from romm.

sargunv avatar sargunv commented on August 27, 2024

Some detail on the cause: the files column on the roms table used to be a list[str], but now it's a list[RomFile]. However, in my database, ~47 rom records still have strings instead of objects:

select json_type(json_extract(files, "$[0]")) as type, count(*)
from roms
group by type
type count(*)
null 1608
OBJECT 565
STRING 47

I'm not sure why 47 records failed to convert to object, or how to force them to convert (short of manually updating the db records)

from romm.

gantoine avatar gantoine commented on August 27, 2024

Thanks for investigating this! I was about to add that triggering any scan will fix the files array, and that the latest alpha release should trigger a scan on startup (through a migration). In any case we'll add a note in the release notes to manually run a scan if it doesn't trigger automatically on upgrade.

BTW if you're interested in testing future pre-releases, there's a closed Alpha Testers group on our Discord. We'd love to have you join it! https://discord.gg/PDGPX6tZ

from romm.

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.