Ticket #1112 (closed defect: invalid)

Opened 4 years ago

Last modified 13 months ago

error Junk at end file

Reported by: anonymous Owned by: rakshasa
Priority: high Component: rtorrent
Version: Severity: normal
Keywords: Cc: webmaster@tunisiagate.net

Description

hi always i try open rtorrent i get this error

rtorrent: Error in option file: ~/.rtorrent.rc:2: Junk at end of input. so any fix

Attachments

rtorrent.rc Download (0.7 KB) - added by alberkman@gmail.com 3 years ago.
i can't open rtorrent, see this error, rtorrent: Error in option file: ~/.rtorrent.rc:28: Junk at end of input.
rtorrent.2.rc Download (4.6 KB) - added by alberkman@gmail.com 3 years ago.
excuse, this is the file that gives the problem, rtorrent: Error in option file: ~/.rtorrent.rc:28: Junk at end of input.

Change History

  Changed 4 years ago by anonymous

Remove the junk at the end of line 2.

  Changed 4 years ago by anonymous

Same here. Valid .rc file.

  Changed 4 years ago by rakshasa

  • status changed from new to closed
  • resolution set to worksforme

Unless you can show there's no junk at the end of line 2, this isn't a bug.

  Changed 4 years ago by anonymous

  • status changed from closed to reopened
  • resolution worksforme deleted

# This is an example resource file for rTorrent. Copy to # ~/.rtorrent.rc and enable/modify the options as needed. Remember to # uncomment the options you wish to enable. # Maximum and minimum number of peers to connect to per torrent. min_peers = 40 max_peers = 500 # Same as above but for seeding completed torrents (-1 = same as downloading) min_peers_seed = -1 max_peers_seed = 50 ...

rtorrent: Error in option file: ~/.rtorrent.rc:5: Junk at end of input.

the .rc file is downloaded from trac.

  Changed 4 years ago by anonymous

Whoops. It seems that the newlines got taken out of the post for some reason. Here it is again

 http://pastebin.com/m7cd58cd

  Changed 4 years ago by rakshasa

It's saved in dos mode, where \n\r instead of just \n is used for new lines. I'll fix the parsers so it ignores those. Until then, use a real editor.

Changed 3 years ago by alberkman@gmail.com

i can't open rtorrent, see this error, rtorrent: Error in option file: ~/.rtorrent.rc:28: Junk at end of input.

Changed 3 years ago by alberkman@gmail.com

excuse, this is the file that gives the problem, rtorrent: Error in option file: ~/.rtorrent.rc:28: Junk at end of input.

  Changed 3 years ago by anonymous

That file has line 28 commented out, it couldn't possibly generate that message. Unless you've edited the file in a Windows editor which put a stray CR there. In that case, use a real editor to fix the file and remove all broken line endings. Or some other tool to do the line ending conversion.

Basically, don't edit a unix text file in a Windows editor. They love to break things.

  Changed 3 years ago by IT.M0nk3y@hotmail.com

Don't use PICO either, that breaks things just as often as a Windows editor!

in reply to: ↑ description   Changed 3 years ago by nunobaba@gmail.com

I've got rtorrent.rc to be taken by rtorrent at last. Two things I need to fix: - remove any blank lines from the file - add a semi-colon(;) at the end of each line Afte that, rtorrent is working correctly.

  Changed 3 years ago by douglasracaixeta@gmail.com

What is a real editor? I'm using Gedit, no blank lines and (;) at the end of the lines, and I still get the error. And the error is: Junk at the end file, but no line number. I try to save the file with UTF-8 and ISO, both are not working.

  Changed 3 years ago by rakshasa

  • status changed from reopened to closed
  • resolution set to invalid

  Changed 13 months ago by anonymous

AFAICT the source comes with a borked rtorrent.rc example file. It's necessary to create a new one from scratch, as editing the example rc (which apparently some dufus edited with a windows editor of some sort) will not work. One would think that 21 months would be enough time to replace a sample rc file...

Note: See TracTickets for help on using tickets.