Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Bug: Psych::DisallowedClass: Tried to load unspecified class: Symbol #123

Open
dblandin opened this issue Aug 9, 2019 · 6 comments
Open

Comments

@dblandin
Copy link

dblandin commented Aug 9, 2019

Hi there!

Thanks so much for this gem! Very excited to start using it. During setup, I ran into this error after creating the execution map and configuring crystalball to run on Circle CI. I see the error running in a local Docker container as well. Happy to provide any supplemental information you might find useful.

  • ruby: 2.6.3
  • os: alpine 3.10.1
  • gem version: 0.7.0
Stack trace

+ CRYSTALBALL_CONFIG=./config/crystalball_data.yml
+ bundle exec crystalball
Psych::DisallowedClass: Tried to load unspecified class: Symbol
  /usr/local/lib/ruby/2.6.0/psych/class_loader.rb:97:in `find'
  /usr/local/lib/ruby/2.6.0/psych/class_loader.rb:28:in `load'
  /usr/local/lib/ruby/2.6.0/psych/class_loader.rb:39:in `block (2 levels) in <class:ClassLoader>'
  /usr/local/lib/ruby/2.6.0/psych/class_loader.rb:32:in `symbolize'
  /usr/local/lib/ruby/2.6.0/psych/class_loader.rb:82:in `symbolize'
  /usr/local/lib/ruby/2.6.0/psych/scalar_scanner.rb:83:in `tokenize'
  /usr/local/lib/ruby/2.6.0/psych/visitors/to_ruby.rb:60:in `deserialize'
  /usr/local/lib/ruby/2.6.0/psych/visitors/to_ruby.rb:123:in `visit_Psych_Nodes_Scalar'
  /usr/local/lib/ruby/2.6.0/psych/visitors/visitor.rb:16:in `visit'
  /usr/local/lib/ruby/2.6.0/psych/visitors/visitor.rb:6:in `accept'
  /usr/local/lib/ruby/2.6.0/psych/visitors/to_ruby.rb:32:in `accept'
  /usr/local/lib/ruby/2.6.0/psych/visitors/to_ruby.rb:337:in `block in revive_hash'
  /usr/local/lib/ruby/2.6.0/psych/visitors/to_ruby.rb:336:in `each'
  /usr/local/lib/ruby/2.6.0/psych/visitors/to_ruby.rb:336:in `each_slice'
  /usr/local/lib/ruby/2.6.0/psych/visitors/to_ruby.rb:336:in `revive_hash'
  /usr/local/lib/ruby/2.6.0/psych/visitors/to_ruby.rb:162:in `visit_Psych_Nodes_Mapping'
  /usr/local/lib/ruby/2.6.0/psych/visitors/visitor.rb:16:in `visit'
  /usr/local/lib/ruby/2.6.0/psych/visitors/visitor.rb:6:in `accept'
  /usr/local/lib/ruby/2.6.0/psych/visitors/to_ruby.rb:32:in `accept'
  /usr/local/lib/ruby/2.6.0/psych/visitors/to_ruby.rb:311:in `visit_Psych_Nodes_Document'
  /usr/local/lib/ruby/2.6.0/psych/visitors/visitor.rb:16:in `visit'
  /usr/local/lib/ruby/2.6.0/psych/visitors/visitor.rb:6:in `accept'
  /usr/local/lib/ruby/2.6.0/psych/visitors/to_ruby.rb:32:in `accept'
  /usr/local/lib/ruby/2.6.0/psych.rb:360:in `safe_load'
  /usr/local/bundle/gems/crystalball-0.7.0/lib/crystalball/rspec/runner.rb:44:in `config'
  /usr/local/bundle/gems/crystalball-0.7.0/lib/crystalball/rspec/runner.rb:16:in `run'
  /usr/local/bundle/gems/rspec-core-3.8.2/lib/rspec/core/runner.rb:45:in `invoke'
  /usr/local/bundle/gems/crystalball-0.7.0/bin/crystalball:5:in `<top (required)>'
  /usr/local/bundle/bin/crystalball:23:in `load'
  /usr/local/bundle/bin/crystalball:23:in `<top (required)>'
bundler: failed to load command: crystalball (/usr/local/bundle/bin/crystalball)

cc/ @erikdstock

@pirj
Copy link
Contributor

pirj commented Aug 9, 2019

Hi @dblandin

Can you please share your config/crystalball_data.yml?

@dblandin
Copy link
Author

dblandin commented Aug 9, 2019

Hi @pirj 👋

I created a gist with its content: https://gist.github.com/dblandin/1873cc773e1d71e8ce905ef1984bee76

@pirj
Copy link
Contributor

pirj commented Sep 10, 2019

@dblandin I'm truly sorry, I meant config/crystalball.yml. Can you please paste it?
It seems there's an error while loading this config file.

@pirj
Copy link
Contributor

pirj commented Jan 27, 2020

@dblandin ping

@TTD93
Copy link

TTD93 commented Mar 3, 2020

I also got this error when trying to setup crystallball.yml locally under config/crystallball.yml. I've one line in the file execution_map_path: 'crystalball_data.yml'.
When I use the default setup without the crystallball.yml file, where crystalball_data.yml is under tmp/crystalball_data.yml it works.

marksiemers pushed a commit to marksiemers/crystalball that referenced this issue Jan 9, 2022
Psych.safe_load changed it's method signature and requires
keyword args for 'permitted_classes'

Update the calls to Psych.safe_load and add it as an explicit
gem dependency with a pessimistic lock on the version.
@marksiemers
Copy link

Possibly fixed by #134

langsharpe pushed a commit to thelookoutway/crystalball that referenced this issue Jul 13, 2022
Psych.safe_load changed it's method signature and requires
keyword args for 'permitted_classes'

Update the calls to Psych.safe_load and add it as an explicit
gem dependency with a pessimistic lock on the version.
SamMolokanov added a commit to wrapbook/crystalball that referenced this issue Dec 19, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants