Skip Menu |

This queue is for tickets about the WWW-Myspace CPAN distribution.

Report information
The Basics
Id: 38457
Status: resolved
Priority: 0/
Queue: WWW-Myspace

People
Owner: steven [...] pyro.eu.org
Requestors: jworkman [...] pimpworks.org
Cc:
AdminCc:

Bug Information
Severity: Normal
Broken in: 0.82
Fixed in: 0.84



Subject: last login 14104 days ago
Certain profiles are getting incorrect last login times. For example http://profile.myspace.com/index.cfm?fuseaction=user.viewprofile&friendid=112263257 322) 112263257 Skipping last login 14104 days ago page. Sleeping for 10 seconds... As of the time I submitted this, the last login as displayed on the profile was 8/8/2008. This is using Myspace.pm with Myspace::FriendAdder.
I believe this was fixed only yesterday in SVN R-612 which you may not have been using. However, I just rewrote the function *again* (as well as fixing the last_login_ymd function) so please try again with the latest SVN (R-618) which I think will fix your problem. 14104 days ago, incidentally, was the epoch (1/1/1970, the 'zero' UNIX date). Obviously the function was returning zero when it couldn't parse the date -- in future the function should return 'undef' on failure. Thanks for your feedback; I personally haven't used the FriendAdder before so it's nice to know if it's working or not.
From: jworkman [...] pimpworks.org
On Wed Aug 13 21:21:22 2008, steven@pyro.eu.org wrote: Show quoted text
> I believe this was fixed only yesterday in SVN R-612 which you may not > have been using. However, I just rewrote the function *again* (as well > as fixing the last_login_ymd function) so please try again with the > latest SVN (R-618) which I think will fix your problem. > > 14104 days ago, incidentally, was the epoch (1/1/1970, the 'zero' UNIX > date). Obviously the function was returning zero when it couldn't parse > the date -- in future the function should return 'undef' on failure. > > Thanks for your feedback; I personally haven't used the FriendAdder > before so it's nice to know if it's working or not.
I'm using R-618 now and it's still broken. Additionally I'm getting this error which I think may be related: last_login: failed to retrieve specified profile at /usr/local/lib/perl5/site_perl/5.8.6/WWW/Myspace.pm line 1777, <STDIN> line 2.
On Thu Aug 14 11:45:51 2008, jworkman@pimpworks.org wrote: Show quoted text
> I'm using R-618 now and it's still broken. Additionally I'm getting > this error which I think may be related: > > last_login: failed to retrieve specified profile at > /usr/local/lib/perl5/site_perl/5.8.6/WWW/Myspace.pm line 1777, <STDIN> > line 2.
I've tried the FriendAdder myself just now and so far it seems to be working. Could you show me some more of the FriendAdder's output, particularly which profiles are causing that error message? How frequently does that error show, and does it resume adding other profiles after showing that error? Thanks.
From: jworkman [...] pimpworks.org
On Thu Aug 14 15:57:59 2008, steven@pyro.eu.org wrote: Show quoted text
> Could you show me some more of the FriendAdder's output, particularly > which profiles are causing that error message? How frequently does that > error show, and does it resume adding other profiles after showing that > error? > > Thanks.
The script continues to run but it looks like it's choking on profiles instead of adding them now. This is using FriendAdder to friend personal profiles from friend ID: 163004369. Getting friend ids from Myspace... List finished. Tossing out matches... 548 seconds to exclude duplicates. 1439 ids supplied by you. 43 friends excluded. 1396 unique ids. Beginning to process the ids... 1) 1000494797 Skipping band page. Sleeping for 10 seconds... 2) 1000680989 Skipping band page. Sleeping for 10 seconds... Use of uninitialized value in pattern match (m//) at /usr/local/lib/perl5/site_p erl/5.8.6/WWW/Myspace.pm line 1846, <STDIN> line 2. Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl 5/site_perl/5.8.6/WWW/Myspace.pm line 1850, <STDIN> line 2. last_login: failed to retrieve specified profile at /usr/local/lib/perl5/site_p erl/5.8.6/WWW/Myspace.pm line 1777, <STDIN> line 2. Use of uninitialized value in numeric lt (<) at /usr/local/lib/perl5/site_perl/5 .8.6/WWW/Myspace/FriendAdder.pm line 553, <STDIN> line 2. Use of uninitialized value in pattern match (m//) at /usr/local/lib/perl5/site_p erl/5.8.6/WWW/Myspace.pm line 1846, <STDIN> line 2. Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl 5/site_perl/5.8.6/WWW/Myspace.pm line 1850, <STDIN> line 2. last_login: failed to retrieve specified profile at /usr/local/lib/perl5/site_perl/5.8.6/WWW/Myspace.pm line 1777, <STDIN> line 2. Use of uninitialized value in subtraction (-) at /usr/local/lib/perl5/site_perl/5.8.6/WWW/Myspace/FriendAdder.pm line 557, <STDIN> line 2. 3) 1000687121 Skipping last login 14105 days ago page. Sleeping for 10 seconds... 4) 1000714448 Skipping band page. Sleeping for 10 seconds... 5) 1000921337 Skipping band page. Sleeping for 10 seconds... Use of uninitialized value in pattern match (m//) at /usr/local/lib/perl5/site_perl/5.8.6/WWW/Myspace.pm line 1846, <STDIN> line 2. Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/site_perl/5.8.6/WWW/Myspace.pm line 1850, <STDIN> line 2. last_login: failed to retrieve specified profile at /usr/local/lib/perl5/site_perl/5.8.6/WWW/Myspace.pm line 1777, <STDIN> line 2. Use of uninitialized value in numeric lt (<) at /usr/local/lib/perl5/site_perl/5.8.6/WWW/Myspace/FriendAdder.pm line 553, <STDIN> line 2. Use of uninitialized value in pattern match (m//) at /usr/local/lib/perl5/site_perl/5.8.6/WWW/Myspace.pm line 1846, <STDIN> line 2. Use of uninitialized value in concatenation (.) or string at /usr/local/lib/perl5/site_perl/5.8.6/WWW/Myspace.pm line 1850, <STDIN> line 2. last_login: failed to retrieve specified profile at /usr/local/lib/perl5/site_perl/5.8.6/WWW/Myspace.pm line 1777, <STDIN> line 2. Use of uninitialized value in subtraction (-) at /usr/local/lib/perl5/site_perl/5.8.6/WWW/Myspace/FriendAdder.pm line 557, <STDIN> line 2. 6) 100112270 Skipping last login 14105 days ago page. Sleeping for 10 seconds... If it makes any difference: eclipse:~$ perl --version This is perl, v5.8.6 built for i386-netbsd
I can't actually reproduce the problem here with FriendAdder (perhaps you are using the Myspace::Data extension?), but please try SVN R-620. Thanks.
From: jworkman [...] pimpworks.org
On Thu Aug 14 20:46:20 2008, steven@pyro.eu.org wrote: Show quoted text
> I can't actually reproduce the problem here with FriendAdder (perhaps > you are using the Myspace::Data extension?), but please try SVN R-620. > > Thanks.
My script is more or less the example script that's in the documentation for WWW::Myspace::FriendAdder. I'm still having the same problem with R-620 so there must be some weird problem with a dependency that I can't pinpoint.
On Fri Aug 15 00:06:28 2008, jworkman@pimpworks.org wrote: Show quoted text
> ...there must be some weird problem with a dependency that I can't > pinpoint.
If you have the latest SVN (R-625 now), you could try this in the WWW::Myspace module directory (i.e. /trunk/WWW-Myspace/ ) : perl Makefile.PL make test TEST_VERBOSE=1 TEST_FILES='t/20-last-login.t' If there is something different about your environment causing a problem, those tests are supposed pick up on it. It won't matter if you haven't configured any dummy/test accounts (which some of the other tests normally require). Tests 9 and 10 both take a minute or so and show a warning which is normal, but there should be no test failures. If the warnings when running the FriendAdder are any different now, please post plenty of output from it for me to look at. What you could do is set the max_count option to 10 or 50, let it run until it finishes, and post the entire output of it which might hold some clues. Thanks.
From: jworkman [...] pimpworks.org
On Fri Aug 15 04:22:53 2008, steven@pyro.eu.org wrote: Show quoted text
> On Fri Aug 15 00:06:28 2008, jworkman@pimpworks.org wrote:
> > ...there must be some weird problem with a dependency that I can't > > pinpoint.
> > If you have the latest SVN (R-625 now), you could try this in the > WWW::Myspace module directory (i.e. /trunk/WWW-Myspace/ ) : > perl Makefile.PL > make test TEST_VERBOSE=1 TEST_FILES='t/20-last-login.t' > > If there is something different about your environment causing a > problem, those tests are supposed pick up on it. It won't matter if you > haven't configured any dummy/test accounts (which some of the other > tests normally require). Tests 9 and 10 both take a minute or so and > show a warning which is normal, but there should be no test failures.
I grabbed R-625 and tested it per the above and indeed I got no test failures. Show quoted text
> If the warnings when running the FriendAdder are any different now, > please post plenty of output from it for me to look at. What you could > do is set the max_count option to 10 or 50, let it run until it > finishes, and post the entire output of it which might hold some clues.
After running the above "make test" I installed the module and re-ran my script after setting max_count to 10. Not only am I having the same problem as before but it's also ignoring max_count. I'm thinking maybe there's been a syntax change of some sort since I first wrote this script, perhaps? I am attaching both the script I am using, and the output from that script.
Download typescript
application/octet-stream 12.4k

Message body not shown because it is not plain text.

#!/usr/local/bin/perl use WWW::Myspace; use WWW::Myspace::FriendAdder; # see WWW::Myspace docs for more info on user/pass usage my $myspace = WWW::Myspace->new(); my $adder = WWW::Myspace::FriendAdder->new( $myspace ); # or pass some startup parameters my %startup_params = ( exclude_my_friends => 1, max_count => 10, interactive => 1, last_login => 60, profile_type => 'personal' ); my $adder = WWW::Myspace::FriendAdder->new( $myspace, \%startup_params, ); # Magica my @friend_ids = $myspace->friends_from_profile('163004369'); $adder->send_friend_requests( @friend_ids);
Thanks for all the info. I've managed to work out what was causing it. I'd also forgotten to set a max_login parameter when I was testing the FriendAdder, and so it wasn't triggering the bug. I believe SVN R-628 fixes this. I also added some extra tests to t/20-last-login.t, so if you somehow you still have this problem, please re-run the 'make test' command mentioned previously and post the output here. As for max_count, I suspect it must only stop running after 10 successful attempts at sending a friend request, and so it will probably work now. Thanks again!
From: jworkman [...] pimpworks.org
This works! Thank you so much for all the time you've spent on this.