sferik / t-ruby

A command-line power tool for Twitter.
http://sferik.github.com/t
MIT License
5.43k stars 410 forks source link

can't modify frozen String: "" #449

Open ryancdotorg opened 3 years ago

ryancdotorg commented 3 years ago

I'm using Ubuntu 20.04 with the distribution provided ruby package, which is ruby 2.7.0. Any attempt to use t now gives a traceback similar to the following:

$ t followers
Traceback (most recent call last):
        18: from /home/ryanc/.gem/ruby/2.7.0/bin/t:23:in `<main>'
        17: from /home/ryanc/.gem/ruby/2.7.0/bin/t:23:in `load'
        16: from /home/ryanc/.gem/ruby/2.7.0/gems/t-3.1.0/bin/t:20:in `<top (required)>'
        15: from /home/ryanc/.gem/ruby/2.7.0/gems/thor-1.1.0/lib/thor/base.rb:485:in `start'
        14: from /home/ryanc/.gem/ruby/2.7.0/gems/thor-1.1.0/lib/thor.rb:392:in `dispatch'
        13: from /home/ryanc/.gem/ruby/2.7.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in `invoke_command'
        12: from /home/ryanc/.gem/ruby/2.7.0/gems/thor-1.1.0/lib/thor/command.rb:27:in `run'
        11: from /home/ryanc/.gem/ruby/2.7.0/gems/t-3.1.0/lib/t/cli.rb:365:in `followers'
        10: from /home/ryanc/.gem/ruby/2.7.0/gems/twitter-6.2.0/lib/twitter/rest/friends_and_followers.rb:48:in `follower_ids'
         9: from /home/ryanc/.gem/ruby/2.7.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:161:in `cursor_from_response_with_user'
         8: from /home/ryanc/.gem/ruby/2.7.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:166:in `user_id'
         7: from /home/ryanc/.gem/ruby/2.7.0/gems/twitter-6.2.0/lib/twitter/rest/users.rb:53:in `verify_credentials'
         6: from /home/ryanc/.gem/ruby/2.7.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:57:in `perform_get_with_object'
         5: from /home/ryanc/.gem/ruby/2.7.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:72:in `perform_request_with_object'
         4: from /home/ryanc/.gem/ruby/2.7.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:50:in `perform_request'
         3: from /home/ryanc/.gem/ruby/2.7.0/gems/twitter-6.2.0/lib/twitter/rest/request.rb:37:in `perform'
         2: from /usr/lib/ruby/2.7.0/forwardable.rb:229:in `empty?'
         1: from /home/ryanc/.gem/ruby/2.7.0/gems/http-3.3.0/lib/http/response/body.rb:52:in `to_s'
/home/ryanc/.gem/ruby/2.7.0/gems/http-3.3.0/lib/http/response/body.rb:52:in `force_encoding': can't modify frozen String: "" (FrozenError)
greggh commented 3 years ago

I'm getting the same bug.

~ ᐅ t mentions /usr/local/lib/ruby/gems/3.0.0/gems/http-3.3.0/lib/http/response/body.rb:52:in 'force_encoding': can't modify frozen String: "" (FrozenError) from /usr/local/lib/ruby/gems/3.0.0/gems/http-3.3.0/lib/http/response/body.rb:52:in 'to_s' from /usr/local/Cellar/ruby/3.0.2/lib/ruby/3.0.0/forwardable.rb:232:in 'empty?' from /usr/local/lib/ruby/gems/3.0.0/gems/twitter-6.2.0/lib/twitter/rest/request.rb:37:in 'perform' from /usr/local/lib/ruby/gems/3.0.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:50:in 'perform_request' from /usr/local/lib/ruby/gems/3.0.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:95:in 'perform_request_with_objects' from /usr/local/lib/ruby/gems/3.0.0/gems/twitter-6.2.0/lib/twitter/rest/utils.rb:80:in 'perform_get_with_objects' from /usr/local/lib/ruby/gems/3.0.0/gems/twitter-6.2.0/lib/twitter/rest/timelines.rb:26:in 'mentions_timeline' from /usr/local/lib/ruby/gems/3.0.0/gems/t-3.1.0/lib/t/cli.rb:521:in 'block in mentions' from /usr/local/lib/ruby/gems/3.0.0/gems/t-3.1.0/lib/t/collectable.rb:26:in 'block in collect_with_count' from /usr/local/lib/ruby/gems/3.0.0/gems/t-3.1.0/lib/t/collectable.rb:12:in 'block in collect_with_max_id' from /usr/local/lib/ruby/gems/3.0.0/gems/retryable-2.0.4/lib/retryable.rb:68:in 'retryable' from /usr/local/lib/ruby/gems/3.0.0/gems/t-3.1.0/lib/t/collectable.rb:11:in 'collect_with_max_id' from /usr/local/lib/ruby/gems/3.0.0/gems/t-3.1.0/lib/t/collectable.rb:16:in 'collect_with_max_id' from /usr/local/lib/ruby/gems/3.0.0/gems/t-3.1.0/lib/t/collectable.rb:22:in 'collect_with_count' from /usr/local/lib/ruby/gems/3.0.0/gems/t-3.1.0/lib/t/cli.rb:520:in 'mentions' from /usr/local/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/command.rb:27:in 'run' from /usr/local/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/invocation.rb:127:in 'invoke_command' from /usr/local/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor.rb:392:in 'dispatch' from /usr/local/lib/ruby/gems/3.0.0/gems/thor-1.1.0/lib/thor/base.rb:485:in 'start' from /usr/local/lib/ruby/gems/3.0.0/gems/t-3.1.0/bin/t:20:in '<top (required)>' from /usr/local/lib/ruby/gems/3.0.0/bin/t:23:in 'load' from /usr/local/lib/ruby/gems/3.0.0/bin/t:23:in '<main>'

derwiki commented 3 years ago

I used RVM to switch to ruby 2.5.9 and that worked for me

gunvantsr commented 2 years ago

Hello, i'm also getting the same error. don't know how to solve this.

pavellishin commented 2 years ago

Looks like the same issue as #452