Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chriss Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Perl error on MediaWiki script

Status
Not open for further replies.

bhound89

Programmer
Joined
Aug 6, 2006
Messages
2
Location
US
Im using this script:

to try to upload images to my personal wiki.
I am getting the error:
Can't open file blah.jpg: No such file or directory at /Library/Perl/5.8.6/LWP/UserAgent.pm line 427

Line 427 of UserAgent.pm is:
Code:
return $self->request( HTTP::Request::Common::POST( @parameters ),

please help.
 
The problem probably isn't within LWP::UserAgent directly, since LWP::UserAgent doesn't have any particular requests hardcoded into it. That's just where Perl died.

Look in your own code for where you tried to do something with blah.jpg. Since you didn't post your code, I can only assume what caused this error:

You send a request through LWP::UserAgent that LWP::UserAgent accepted and tried to follow through with. It failed on that request, causing your Perl script to crash. It crashed because of LWP::UserAgent because that's the bit of code trying to do a request that it couldn't do. It's not a fault of LWP::UserAgent in this case but in the code that told LWP::UserAgent what to do.
 
The code is in that link I posted- the only things I changed were the two URLs for logging in and uploading.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top