Reputation: 1659
We have been using Perl's Net:Twitter CPAN module (version 3.12) and basic authentication (not OAuth) for almost a year now to syndicate updates from our site to our Twitter account. We just migrated to a new server last week and since the move our updates to Twitter have stopped and the following error is being reported whenever we try to post an update:
HTTP::Message content not bytes at /usr/lib/perl5/site_perl/5.8.8/HTTP/Request/Common.pm line 90
Here is the code we're using the update our Twitter account:
use Net::Twitter;
my $twitter = Net::Twitter->new(
traits => [qw/API::REST/],
username => $username,
password => $password,
source => 'twitterfeed'
);
my $result = $twitter->update($status);
I have no idea what the issue is and was hoping that someone else has run into this issue and can provide a quick solution. Thanks in advance for your help!
Upvotes: 4
Views: 185
Reputation: 132822
Most complaints about that error seem to be solved by updating libwww-perl and SOAP::Lite. When Perl made the switch to representing internal strings as UTF-8, it took awhile for the modules to catch up. It was so easy to assume that all strings were octets, so most modules didn't bother with encodings and the like. Most of the main modules should be fixed by now.
Try googling for "HTTP::Message content not bytes" to see how other people solved it. In general, googling the error message often turns up lots of helpful discussions. :)
Upvotes: 1