node snapshot error: table nodes has no column named role #1

Closed
opened 2026-10-04 22:56:36 +02:00 by adam · 1 comment
Owner

database python ingestor script for nodes data regulary throws the following error:

node snapshot error: table nodes has no column named role

probably inconsistency in node data records. need better parsing of node roles and ensure it is consistent with the already existing roles in the database.

database python ingestor script for nodes data regulary throws the following error: ``` node snapshot error: table nodes has no column named role ``` probably inconsistency in node data records. need better parsing of node roles and ensure it is consistent with the already existing roles in the database. <!-- github-sync-id:3412735123 -->
adam closed this issue 2026-10-04 22:56:36 +02:00
Author
Owner

web app also stumbled upon the missing role.

~/.l5y/potato-mesh/web main* 1m 5s
❯ ./app.sh
Fetching gem metadata from https://rubygems.org/.....
Resolving dependencies...
Bundle complete! 4 Gemfile dependencies, 15 gems now installed.
Bundled gems are installed into `/home/user/.local/share/gem`
== Sinatra (v4.1.1) has taken the stage on 41447 for development with backup from Puma
Puma starting in single mode...
* Puma version: 7.0.2 ("Romantic Warrior")
* Ruby version: ruby 3.4.5 (2025-07-16 revision 20cda200d3) +PRISM [x86_64-linux]
*  Min threads: 0
*  Max threads: 5
*  Environment: development
*          PID: 19904
* Listening on http://127.0.0.1:41447
Use Ctrl-C to stop
127.0.0.1 - - [13/Sep/2025:08:53:36 +0200] "GET / HTTP/1.1" 200 6213 0.0023
2025-09-13 08:53:36 - SQLite3::SQLException - no such column: role::
        SELECT node_id, short_name, long_name, hw_model, role, snr, battery_level,
                                                         ^
               last_heard, position_time, latitude, longitude, altitude
        FROM nodes
        ORDER BY last_heard DESC
        LIMIT ?
        /home/user/.gem/ruby/3.4.0/gems/sqlite3-2.7.3-x86_64-linux-gnu/lib/sqlite3/statement.rb:36:in 'SQLite3::Statement#prepare'
        /home/user/.gem/ruby/3.4.0/gems/sqlite3-2.7.3-x86_64-linux-gnu/lib/sqlite3/statement.rb:36:in 'SQLite3::Statement#initialize'
        /home/user/.gem/ruby/3.4.0/gems/sqlite3-2.7.3-x86_64-linux-gnu/lib/sqlite3/database.rb:217:in 'Class#new'
        /home/user/.gem/ruby/3.4.0/gems/sqlite3-2.7.3-x86_64-linux-gnu/lib/sqlite3/database.rb:217:in 'SQLite3::Database#prepare'
        /home/user/.gem/ruby/3.4.0/gems/sqlite3-2.7.3-x86_64-linux-gnu/lib/sqlite3/database.rb:249:in 'SQLite3::Database#execute'
        app.rb:14:in 'Object#query_nodes'
        app.rb:34:in 'block in <main>'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1807:in 'Method#call'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1807:in 'block in Sinatra::Base.compile!'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1074:in 'block (3 levels) in Sinatra::Base#route!'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1092:in 'Sinatra::Base#route_eval'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1074:in 'block (2 levels) in Sinatra::Base#route!'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1123:in 'block in Sinatra::Base#process_route'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1121:in 'Kernel#catch'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1121:in 'Sinatra::Base#process_route'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1072:in 'block in Sinatra::Base#route!'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1069:in 'Array#each'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1069:in 'Sinatra::Base#route!'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1193:in 'block in Sinatra::Base#dispatch!'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1164:in 'Kernel#catch'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1164:in 'Sinatra::Base#invoke'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1188:in 'Sinatra::Base#dispatch!'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1004:in 'block in Sinatra::Base#call!'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1164:in 'Kernel#catch'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1164:in 'Sinatra::Base#invoke'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1004:in 'Sinatra::Base#call!'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:993:in 'Sinatra::Base#call'
        /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/base.rb:53:in 'Rack::Protection::Base#call'
        /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/xss_header.rb:20:in 'Rack::Protection::XSSHeader#call'
        /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/path_traversal.rb:18:in 'Rack::Protection::PathTraversal#call'
        /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/json_csrf.rb:28:in 'Rack::Protection::JsonCsrf#call'
        /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/base.rb:53:in 'Rack::Protection::Base#call'
        /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/base.rb:53:in 'Rack::Protection::Base#call'
        /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/frame_options.rb:33:in 'Rack::Protection::FrameOptions#call'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/middleware/logger.rb:17:in 'Sinatra::Middleware::Logger#call'
        /home/user/.gem/ruby/3.4.0/gems/rack-3.2.1/lib/rack/common_logger.rb:43:in 'Rack::CommonLogger#call'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:269:in 'Rack::CommonLogger#call'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:262:in 'Sinatra::CommonLogger#call'
        /home/user/.gem/ruby/3.4.0/gems/rack-3.2.1/lib/rack/head.rb:15:in 'Rack::Head#call'
        /home/user/.gem/ruby/3.4.0/gems/rack-3.2.1/lib/rack/method_override.rb:28:in 'Rack::MethodOverride#call'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/show_exceptions.rb:23:in 'Sinatra::ShowExceptions#call'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:227:in 'Sinatra::ExtendedRack#call'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:2138:in 'Sinatra::Wrapper#call'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1677:in 'block in Sinatra::Base.call'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1898:in 'Sinatra::Base.synchronize'
        /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1677:in 'Sinatra::Base.call'
        /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/configuration.rb:297:in 'Puma::Configuration::ConfigMiddleware#call'
        /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/request.rb:101:in 'block in Puma::Request#handle_request'
        /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/thread_pool.rb:346:in 'Puma::ThreadPool#with_force_shutdown'
        /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/request.rb:100:in 'Puma::Request#handle_request'
        /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/server.rb:497:in 'Puma::Server#process_client'
        /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/server.rb:266:in 'block in Puma::Server#run'
        /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/thread_pool.rb:173:in 'block in Puma::ThreadPool#spawn_thread'
web app also stumbled upon the missing role. ``` ~/.l5y/potato-mesh/web main* 1m 5s ❯ ./app.sh Fetching gem metadata from https://rubygems.org/..... Resolving dependencies... Bundle complete! 4 Gemfile dependencies, 15 gems now installed. Bundled gems are installed into `/home/user/.local/share/gem` == Sinatra (v4.1.1) has taken the stage on 41447 for development with backup from Puma Puma starting in single mode... * Puma version: 7.0.2 ("Romantic Warrior") * Ruby version: ruby 3.4.5 (2025-07-16 revision 20cda200d3) +PRISM [x86_64-linux] * Min threads: 0 * Max threads: 5 * Environment: development * PID: 19904 * Listening on http://127.0.0.1:41447 Use Ctrl-C to stop 127.0.0.1 - - [13/Sep/2025:08:53:36 +0200] "GET / HTTP/1.1" 200 6213 0.0023 2025-09-13 08:53:36 - SQLite3::SQLException - no such column: role:: SELECT node_id, short_name, long_name, hw_model, role, snr, battery_level, ^ last_heard, position_time, latitude, longitude, altitude FROM nodes ORDER BY last_heard DESC LIMIT ? /home/user/.gem/ruby/3.4.0/gems/sqlite3-2.7.3-x86_64-linux-gnu/lib/sqlite3/statement.rb:36:in 'SQLite3::Statement#prepare' /home/user/.gem/ruby/3.4.0/gems/sqlite3-2.7.3-x86_64-linux-gnu/lib/sqlite3/statement.rb:36:in 'SQLite3::Statement#initialize' /home/user/.gem/ruby/3.4.0/gems/sqlite3-2.7.3-x86_64-linux-gnu/lib/sqlite3/database.rb:217:in 'Class#new' /home/user/.gem/ruby/3.4.0/gems/sqlite3-2.7.3-x86_64-linux-gnu/lib/sqlite3/database.rb:217:in 'SQLite3::Database#prepare' /home/user/.gem/ruby/3.4.0/gems/sqlite3-2.7.3-x86_64-linux-gnu/lib/sqlite3/database.rb:249:in 'SQLite3::Database#execute' app.rb:14:in 'Object#query_nodes' app.rb:34:in 'block in <main>' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1807:in 'Method#call' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1807:in 'block in Sinatra::Base.compile!' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1074:in 'block (3 levels) in Sinatra::Base#route!' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1092:in 'Sinatra::Base#route_eval' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1074:in 'block (2 levels) in Sinatra::Base#route!' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1123:in 'block in Sinatra::Base#process_route' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1121:in 'Kernel#catch' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1121:in 'Sinatra::Base#process_route' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1072:in 'block in Sinatra::Base#route!' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1069:in 'Array#each' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1069:in 'Sinatra::Base#route!' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1193:in 'block in Sinatra::Base#dispatch!' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1164:in 'Kernel#catch' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1164:in 'Sinatra::Base#invoke' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1188:in 'Sinatra::Base#dispatch!' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1004:in 'block in Sinatra::Base#call!' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1164:in 'Kernel#catch' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1164:in 'Sinatra::Base#invoke' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1004:in 'Sinatra::Base#call!' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:993:in 'Sinatra::Base#call' /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/base.rb:53:in 'Rack::Protection::Base#call' /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/xss_header.rb:20:in 'Rack::Protection::XSSHeader#call' /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/path_traversal.rb:18:in 'Rack::Protection::PathTraversal#call' /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/json_csrf.rb:28:in 'Rack::Protection::JsonCsrf#call' /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/base.rb:53:in 'Rack::Protection::Base#call' /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/base.rb:53:in 'Rack::Protection::Base#call' /home/user/.gem/ruby/3.4.0/gems/rack-protection-4.1.1/lib/rack/protection/frame_options.rb:33:in 'Rack::Protection::FrameOptions#call' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/middleware/logger.rb:17:in 'Sinatra::Middleware::Logger#call' /home/user/.gem/ruby/3.4.0/gems/rack-3.2.1/lib/rack/common_logger.rb:43:in 'Rack::CommonLogger#call' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:269:in 'Rack::CommonLogger#call' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:262:in 'Sinatra::CommonLogger#call' /home/user/.gem/ruby/3.4.0/gems/rack-3.2.1/lib/rack/head.rb:15:in 'Rack::Head#call' /home/user/.gem/ruby/3.4.0/gems/rack-3.2.1/lib/rack/method_override.rb:28:in 'Rack::MethodOverride#call' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/show_exceptions.rb:23:in 'Sinatra::ShowExceptions#call' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:227:in 'Sinatra::ExtendedRack#call' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:2138:in 'Sinatra::Wrapper#call' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1677:in 'block in Sinatra::Base.call' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1898:in 'Sinatra::Base.synchronize' /home/user/.gem/ruby/3.4.0/gems/sinatra-4.1.1/lib/sinatra/base.rb:1677:in 'Sinatra::Base.call' /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/configuration.rb:297:in 'Puma::Configuration::ConfigMiddleware#call' /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/request.rb:101:in 'block in Puma::Request#handle_request' /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/thread_pool.rb:346:in 'Puma::ThreadPool#with_force_shutdown' /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/request.rb:100:in 'Puma::Request#handle_request' /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/server.rb:497:in 'Puma::Server#process_client' /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/server.rb:266:in 'block in Puma::Server#run' /home/user/.gem/ruby/3.4.0/gems/puma-7.0.2/lib/puma/thread_pool.rb:173:in 'block in Puma::ThreadPool#spawn_thread' ``` <!-- github-comment-id:3287698282 -->
Sign in to join this conversation.
No labels
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: adam/potato-mesh#1