Skip to content

KeyError issue in the website makes difficult to track logs #1113

Closed

Description

@Rub21

This issue has been around for quite a while and still hasn’t been fixed. It seems to be a harmless or low‑risk issue, but it makes reading the logs harder because there’s a large amount of noise. Sometimes, when real errors occur like: https://discord.com/channels/413070382636072960/634106496560398349/1401943486340661258 , it becomes difficult to track them.

issue 👇

/var/www/lib/osm_community_index.rb:42:in `format': key{مجتمع} not found (KeyError)
	from /var/www/lib/osm_community_index.rb:42:in `resolve_name'
	from /var/www/lib/osm_community_index.rb:22:in `block (2 levels) in add_to_i18n'
	from /usr/local/bundle/ruby/3.3.0/gems/frozen_record-0.27.4/lib/frozen_record/scope.rb:248:in `each'
	from /usr/local/bundle/ruby/3.3.0/gems/frozen_record-0.27.4/lib/frozen_record/scope.rb:248:in `each_with_object'
	from /usr/local/bundle/ruby/3.3.0/gems/frozen_record-0.27.4/lib/frozen_record/scope.rb:248:in `public_send'
	from /usr/local/bundle/ruby/3.3.0/gems/frozen_record-0.27.4/lib/frozen_record/scope.rb:248:in `method_missing'
	from /var/www/lib/osm_community_index.rb:18:in `block in add_to_i18n'
	from /var/www/lib/osm_community_index.rb:12:in `each'
	from /var/www/lib/osm_community_index.rb:12:in `add_to_i18n'
	from /var/www/config/initializers/osm_community_index.rb:2:in `block in <main>'
	from /usr/local/bundle/ruby/3.3.0/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:94:in `block in execute_hook'
	from /usr/local/bundle/ruby/3.3.0/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:87:in `with_execution_control'
	from /usr/local/bundle/ruby/3.3.0/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:92:in `execute_hook'
	from /usr/local/bundle/ruby/3.3.0/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:78:in `block in run_load_hooks'
	from /usr/local/bundle/ruby/3.3.0/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:77:in `each'
	from /usr/local/bundle/ruby/3.3.0/gems/activesupport-8.0.2/lib/active_support/lazy_load_hooks.rb:77:in `run_load_hooks'
	from /usr/local/bundle/ruby/3.3.0/gems/railties-8.0.2/lib/rails/application/finisher.rb:93:in `block in <module:Finisher>'
	from /usr/local/bundle/ruby/3.3.0/gems/railties-8.0.2/lib/rails/initializable.rb:32:in `instance_exec'
	from /usr/local/bundle/ruby/3.3.0/gems/railties-8.0.2/lib/rails/initializable.rb:32:in `run'
	from /usr/local/bundle/ruby/3.3.0/gems/railties-8.0.2/lib/rails/initializable.rb:61:in `block in run_initializers'
	from /usr/local/lib/ruby/3.3.0/tsort.rb:231:in `block in tsort_each'
	from /usr/local/lib/ruby/3.3.0/tsort.rb:353:in `block (2 levels) in each_strongly_connected_component'
	from /usr/local/lib/ruby/3.3.0/tsort.rb:434:in `each_strongly_connected_component_from'
	from /usr/local/lib/ruby/3.3.0/tsort.rb:352:in `block in each_strongly_connected_component'
	from /usr/local/lib/ruby/3.3.0/tsort.rb:350:in `each'
	from /usr/local/lib/ruby/3.3.0/tsort.rb:350:in `call'
	from /usr/local/lib/ruby/3.3.0/tsort.rb:350:in `each_strongly_connected_component'
	from /usr/local/lib/ruby/3.3.0/tsort.rb:229:in `tsort_each'
	from /usr/local/lib/ruby/3.3.0/tsort.rb:208:in `tsort_each'
	from /usr/local/bundle/ruby/3.3.0/gems/railties-8.0.2/lib/rails/initializable.rb:60:in `run_initializers'
	from /usr/local/bundle/ruby/3.3.0/gems/railties-8.0.2/lib/rails/application.rb:440:in `initialize!'
	from /var/www/config/environment.rb:5:in `<top (required)>'
	from config.ru:3:in `require_relative'
	from config.ru:3:in `block in <main>'
	from /usr/local/bundle/ruby/3.3.0/gems/rack-3.1.16/lib/rack/builder.rb:124:in `instance_eval'
	from /usr/local/bundle/ruby/3.3.0/gems/rack-3.1.16/lib/rack/builder.rb:124:in `initialize'
	from config.ru:1:in `new'
	from config.ru:1:in `<main>'
	from /usr/local/bundle/gems/passenger-6.0.27/src/helper-scripts/rack-preloader.rb:101:in `eval'
	from /usr/local/bundle/gems/passenger-6.0.27/src/helper-scripts/rack-preloader.rb:101:in `preload_app'
	from /usr/local/bundle/gems/passenger-6.0.27/src/helper-scripts/rack-preloader.rb:189:in `block in <module:App>'
	from /usr/local/bundle/gems/passenger-6.0.27/src/ruby_supportlib/phusion_passenger/loader_shared_helpers.rb:399:in `run_block_and_record_step_progress'
	from /usr/local/bundle/gems/passenger-6.0.27/src/helper-scripts/rack-preloader.rb:188:in `<module:App>'
	from /usr/local/bundle/gems/passenger-6.0.27/src/helper-scripts/rack-preloader.rb:30:in `<module:PhusionPassenger>'
	from /usr/local/bundle/gems/passenger-6.0.27/src/helper-scripts/rack-preloader.rb:29:in `<main>'

Activity

  1. added
    website
    on Aug 5, 2025
  2. 1ec5 commented on Aug 5, 2025

    @1ec5
    Member
    /var/www/lib/osm_community_index.rb:42:in `format': key{مجتمع} not found (KeyError)
    

    I fixed this specific error in Transifex. (It’s part of the “community” resource in the openstreetmap/id-editor project there.) This isn’t the first time the Arabic translators have overzealously translated placeholder token names…

    More broadly, I opened openstreetmap/openstreetmap-website#5819 to request a more graceful fallback to English when a key is missing. This is a common software development practice, but the maintainers prefer to instead rely on automated tests to catch these issues in the first place. #994 tracks enabling continuous integration for our fork of the website. We’ve gotten as far as enabling the tests, but so many still fail that we’ve been unable to require passing tests. A lot of it is noise that buries the real issues that arise.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    website

    Type

    No type

    Projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions