Skip to content
New issue

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

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

Already on GitHub? # to your account

Ruby - unknown keyword: :permitted_classes (ArgumentError) #120

Closed
KunathBJ opened this issue Apr 27, 2022 · 7 comments
Closed

Ruby - unknown keyword: :permitted_classes (ArgumentError) #120

KunathBJ opened this issue Apr 27, 2022 · 7 comments

Comments

@KunathBJ
Copy link

Hi,

I've tried to run Unipept Cli on a centos server.
The Ruby and Unipept Installation worked well, Unipept --version or --help returned the expected outputs and a typical
"unipept pept2lca AALTER" also worked... at first.

I then tried to give a list of peptide from a file as input and to print the results in an output file and I received this error:
Traceback (most recent call last):
13: from /home/users/bkunath/.gem/ruby/2.7.0/bin/unipept:23:in main
12: from /home/users/bkunath/.gem/ruby/2.7.0/bin/unipept:23:in load
11: from /mnt/irisgpfs/users/bkunath/.gem/ruby/2.7.0/gems/unipept-3.0.0/bin/unipept:8:in <top (required)>
10: from /mnt/irisgpfs/users/bkunath/.gem/ruby/2.7.0/gems/unipept-3.0.0/lib/commands/unipept.rb:373:in run
9: from /mnt/irisgpfs/users/bkunath/.gem/ruby/2.7.0/gems/unipept-3.0.0/lib/commands/unipept.rb:43:in run
8: from /mnt/irisgpfs/users/bkunath/.gem/ruby/2.7.0/gems/cri-2.15.11/lib/cri/command.rb:316:in run
7: from /mnt/irisgpfs/users/bkunath/.gem/ruby/2.7.0/gems/cri-2.15.11/lib/cri/command.rb:298:in run
6: from /mnt/irisgpfs/users/bkunath/.gem/ruby/2.7.0/gems/cri-2.15.11/lib/cri/command.rb:362:in run_this
5: from /mnt/irisgpfs/users/bkunath/.gem/ruby/2.7.0/gems/cri-2.15.11/lib/cri/command_dsl.rb:294:in block in runner
4: from /mnt/irisgpfs/users/bkunath/.gem/ruby/2.7.0/gems/cri-2.15.11/lib/cri/command_dsl.rb:294:in new
3: from /mnt/irisgpfs/users/bkunath/.gem/ruby/2.7.0/gems/unipept-3.0.0/lib/commands/unipept/api_runner.rb:9:in initialize
2: from /mnt/irisgpfs/users/bkunath/.gem/ruby/2.7.0/gems/unipept-3.0.0/lib/commands/unipept/api_runner.rb:9:in new
1: from /mnt/irisgpfs/users/bkunath/.gem/ruby/2.7.0/gems/unipept-3.0.0/lib/configuration.rb:17:in initialize
/mnt/irisgpfs/apps/resif/aion/2020b/epyc/software/Ruby/2.7.2-GCCcore-10.2.0/lib/ruby/2.7.0/psych.rb:576:in load_file: unknown keyword: :permitted_classes (ArgumentError)

And from now on, even running the command "unipept pept2lca AALTER" returns the same issue.
Do you guys have any idea why I have that? I guess it's due to ruby but I don't know enough about it to try to fix it.

Thanks a lot for any support you may bring.

Ben

@bmesuere
Copy link
Member

bmesuere commented Apr 27, 2022

Hi Ben, thanks for your report. I can't seem to reproduce the issue here, but I'll try again later today using Ruby 2.7.

Can you check if the two previous versions of the cli run ok? You can install them using gem install unipept -v 2.2.2 and gem install unipept -v 2.2.1

Between 2.2.1 and 2.2.2 the psych dependency was updated (which might have caused this issue) and support for old ruby versions was dropped (but ruby 2.7 should still be supported).

@bmesuere
Copy link
Member

After some digging, I have found the potential issue. Ruby comes with a default version of the psych gem which in your case doesn't yet support the permitted_classes. I have added a newer version of psych as an explicit dependency which hopefully solves the problem and released a new gem version as 3.0.1.

I was unable to test/reproduce this because both my mac and the Ubuntu version of GitHub Actions seem to include a compatible psych version by default.

Your feedback is thus most welcome!

@KunathBJ
Copy link
Author

KunathBJ commented Apr 27, 2022

Hi Bart,

Thanks for the quick answer. So quick I didn't even had time to try your first solution ^^
I used the version 3.0.1 and it now works.
I do have a slurm file with multiple instance of the message: API request failed! log can be found in /home/users/bkunath/.unipept/unipept-2022-04-27-16:45:57.log

but the expected output is produced so for me it works ;)

Thanks a lot,
Ben

@bmesuere
Copy link
Member

Hmm, the message means that one or more requests failed which shouldn't happen. This is probably an issue on our side, maybe @pverscha can figure out what happens by checking the server logs around that time.

@KunathBJ
Copy link
Author

I've rerun more today and I had the same bunch of messages.
The different times were:
API request failed! log can be found in /home/users/bkunath/.unipept/unipept-2022-04-28-15:05:20.log
API request failed! log can be found in /home/users/bkunath/.unipept/unipept-2022-04-28-15:05:27.log
API request failed! log can be found in /home/users/bkunath/.unipept/unipept-2022-04-28-15:05:46.log

Ben

@pverscha
Copy link
Member

Hi @KunathBJ,

I was able to reproduce your issue and I have made a change to our server configuration, can you please let me know if the issue still persists for you?

@bmesuere
Copy link
Member

bmesuere commented Jun 1, 2022

Hi Ben,

Has this resolved your problem so I can close this issue?

@bmesuere bmesuere closed this as completed Aug 1, 2022
# for free to join this conversation on GitHub. Already have an account? # to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants