Bug 989261 - [abrt] fpaste-0.3.7.1-8.fc19: fpaste:414:main:TypeError: 'bool' object is not iterable
[abrt] fpaste-0.3.7.1-8.fc19: fpaste:414:main:TypeError: 'bool' object is not...
Status: CLOSED ERRATA
Product: Fedora
Classification: Fedora
Component: fpaste (Show other bugs)
20
All Linux
unspecified Severity unspecified
: ---
: ---
Assigned To: Ankur Sinha (FranciscoD)
Fedora Extras Quality Assurance
abrt_hash:c73ba326a629b4339925f11ee62...
: Reopened
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2013-07-28 16:41 EDT by Steve Tyler
Modified: 2014-01-28 22:09 EST (History)
7 users (show)

See Also:
Fixed In Version: fpaste-0.3.7.1-11.fc20
Doc Type: Bug Fix
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2014-01-28 22:09:43 EST
Type: ---
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)
File: backtrace (3.54 KB, text/plain)
2013-07-28 16:41 EDT, Steve Tyler
no flags Details
File: core_backtrace (144 bytes, text/plain)
2013-07-28 16:41 EDT, Steve Tyler
no flags Details
File: environ (2.87 KB, text/plain)
2013-07-28 16:41 EDT, Steve Tyler
no flags Details

  None (edit)
Description Steve Tyler 2013-07-28 16:41:08 EDT
Description of problem:
Attempt to paste an empty file:

$ touch x.txt
$ fpaste x.txt
No text to send.
Traceback (most recent call last):
  File "/usr/bin/fpaste", line 447, in <module>
    main()
  File "/usr/bin/fpaste", line 414, in main
    [url, short_url] = paste(text, options)
TypeError: 'bool' object is not iterable

Version-Release number of selected component:
fpaste-0.3.7.1-8.fc19

Additional info:
reporter:       libreport-2.1.5
cmdline:        python /usr/bin/fpaste x.txt
executable:     /usr/bin/fpaste
kernel:         3.10.3-300.fc19.x86_64
runlevel:       unknown
uid:            1000

Truncated backtrace:
fpaste:414:main:TypeError: 'bool' object is not iterable

Traceback (most recent call last):
  File "/usr/bin/fpaste", line 447, in <module>
    main()
  File "/usr/bin/fpaste", line 414, in main
    [url, short_url] = paste(text, options)
TypeError: 'bool' object is not iterable

Local variables in innermost frame:
validExpiresOpts: ['3600', '10800', '43200', '86400']
text: ''
parser: <optparse.OptionParser instance at 0x1bd07a0>
ext_prev: 'txt'
fileargs: ['x.txt']
usage: 'Usage: %prog [OPTION]... [FILE]...\n  send text file(s), stdin, or clipboard to the http://paste.fedoraproject.org/ pastebin and return the URL.\n\nExamples:\n  %prog file1.txt file2.txt\n  dmesg | %prog\n  (prog1; prog2; prog3) | fpaste\n  %prog --sysinfo -d "my laptop" --confirm\n  %prog -n codemonkey -d "problem with foo" -l python foo.py'
args: ['x.txt']
fpasteOrg_group: <optparse.OptionGroup instance at 0x1c1fcf8>
validClipboardSelectionOpts: ['primary', 'secondary', 'clipboard']
all_exts_similar: True
fpasteProg_group: <optparse.OptionGroup instance at 0x1c910e0>
optk: 'clipboard selection'
f: 'x.txt'
i: 0
ext2lang_map: {'sqlite': 'sqlite3', 'htm': 'html', 'vim': 'vim', 'tcl': 'tcl', 'ini': 'ini', 'xml': 'xml', 'java': 'java', 'py': 'python', 'html': 'html', 'rb': 'rb', 'rhtml': 'rhtml', 'css': 'css', 'php3': 'php', 'c': 'c', 'js': 'js', 'jsp': 'jsp', 'sql': 'sql', 'php': 'php', 'bash': 'bash', 'bat': 'bat', 'h': 'c', 'sh': 'bash', 'pl': 'perl', 'cpp': 'cpp'}
validSyntaxOpts: ['abap', 'antlr', 'antlr-as', 'antlr-cpp', 'antlr-csharp', 'antlr-java', 'antlr-objc', 'antlr-perl', 'antlr-python', 'antlr-ruby', 'apacheconf', 'applescript', 'as', 'as3', 'aspx-cs', 'aspx-vb', 'basemake', 'bash', 'bat', 'bbcode', 'befunge', 'boo', 'brainfuck', 'c', 'c-objdump', 'cheetah', 'clojure', 'common-lisp', 'console', 'control', 'cpp', 'cpp-objdump', 'csharp', 'css', 'css+django', 'css+erb', 'css+genshitext', 'css+mako', 'css+myghty', 'css+php', 'css+smarty', 'cython', 'd', 'd-objdump', 'delphi', 'diff', 'django', 'dpatch', 'dylan', 'erb', 'erl', 'erlang', 'evoque', 'fortran', 'gas', 'genshi', 'genshitext', 'glsl', 'gnuplot', 'groff', 'haskell', 'html', 'html+cheetah', 'html+django', 'html+evoque', 'html+genshi', 'html+mako', 'html+myghty', 'html+php', 'html+smarty', 'ini', 'io', 'irc', 'java', 'js', 'js+cheetah', 'js+django', 'js+erb', 'js+genshitext', 'js+mako', 'js+myghty', 'js+php', 'js+smarty', 'jsp', 'lhs', 'lighty', 'llvm', 'logtalk', 'lua', 'make', 'mako', 'matlab', 'matlabsession', 'minid', 'modelica', 'moocode', 'mupad', 'mxml', 'myghty', 'mysql', 'nasm', 'newspeak', 'nginx', 'numpy', 'objdump', 'objective-c', 'ocaml', 'perl', 'php', 'pot', 'pov', 'prolog', 'py3tb', 'pycon', 'pytb', 'python', 'python3', 'ragel', 'ragel-c', 'ragel-cpp', 'ragel-d', 'ragel-em', 'ragel-java', 'ragel-objc', 'ragel-ruby', 'raw', 'rb', 'rbcon', 'rebol', 'redcode', 'rhtml', 'rst', 'scala', 'scheme', 'smalltalk', 'smarty', 'sourceslist', 'splus', 'sql', 'sqlite3', 'squidconf', 'tcl', 'tcsh', 'tex', 'text', 'trac-wiki', 'vala', 'vb.net', 'vim', 'xml', 'xml+cheetah', 'xml+django', 'xml+erb', 'xml+evoque', 'xml+mako', 'xml+myghty', 'xml+php', 'xml+smarty', 'xslt', 'yaml']
options: <Values at 0x1c91878: {'lang': 'text', 'selection': 'primary', 'clipin': False, 'confirm': False, 'url': 'http://paste.fedoraproject.org/', 'printonly': False, 'expires': '86400', 'pasteself': False, 'nick': '', 'make_private': 'yes', 'proxy': None, 'debug': False, 'clipout': False, 'fullpath': False, 'sysinfo': False, 'desc': 'x.txt'}>
ext: 'txt'
x: 'x.txt'
optv: 'primary'
validPrivateOpts: ['yes', 'no']
opts: ['primary', 'secondary', 'clipboard']

Potential duplicate: bug 962553
Comment 1 Steve Tyler 2013-07-28 16:41:14 EDT
Created attachment 779444 [details]
File: backtrace
Comment 2 Steve Tyler 2013-07-28 16:41:16 EDT
Created attachment 779445 [details]
File: core_backtrace
Comment 3 Steve Tyler 2013-07-28 16:41:19 EDT
Created attachment 779446 [details]
File: environ
Comment 4 Steve Tyler 2013-07-28 17:02:32 EDT
An empty file is used to test the response of the anaconda installer to being served an empty kickstart file via http. See:

Bug 989133 - installer fails to start with 0-byte kickstart file

As a workaround, an empty file is being served from:
http://robatino.fedorapeople.org/ks.cfg
Comment 5 Maxim Polyakov 2013-08-29 04:03:24 EDT
Description of problem:
# rpm -qa | grep "*.R" | fpaste

Version-Release number of selected component:
fpaste-0.3.7.1-8.fc19

Additional info:
reporter:       libreport-2.1.6
cmdline:        python /bin/fpaste
executable:     /bin/fpaste
kernel:         3.9.9-302.fc19.x86_64
runlevel:       N 5
type:           Python
uid:            0

Truncated backtrace:
#1 main in /bin/fpaste:414
#2 <module> in /bin/fpaste:447
Comment 6 Fedora Update System 2014-01-23 02:05:18 EST
fpaste-0.3.7.1-10.fc20 has been submitted as an update for Fedora 20.
https://admin.fedoraproject.org/updates/fpaste-0.3.7.1-10.fc20
Comment 7 Fedora Update System 2014-01-23 02:06:05 EST
fpaste-0.3.7.1-10.fc19 has been submitted as an update for Fedora 19.
https://admin.fedoraproject.org/updates/fpaste-0.3.7.1-10.fc19
Comment 8 lnie 2014-01-23 03:51:45 EST
Tested with fpaste-0.3.7.1-10.fc20,the crash is gone,
but the message "No text to send" is still there
Comment 9 Ankur Sinha (FranciscoD) 2014-01-23 03:59:28 EST
(In reply to lnie from comment #8)
> Tested with fpaste-0.3.7.1-10.fc20,the crash is gone,
> but the message "No text to send" is still there

I let "No text to send" remain so the user knows why he didn't get a URL. This is important for cases where people try piping things into fpaste and it does nothing because it received nothing to paste.
Comment 10 lnie 2014-01-23 04:15:35 EST
(In reply to Ankur Sinha (FranciscoD) from comment #9)
> (In reply to lnie from comment #8)
> > Tested with fpaste-0.3.7.1-10.fc20,the crash is gone,
> > but the message "No text to send" is still there
> 
> I let "No text to send" remain so the user knows why he didn't get a URL.
> This is important for cases where people try piping things into fpaste and
> it does nothing because it received nothing to paste.

Actually,I were thinking,maybe,"the file is empty" or something like that is better?
Comment 11 Ankur Sinha (FranciscoD) 2014-01-23 04:18:02 EST
But what if the user were piping and not pasting a file?

I can modify this at the next update. I don't think it's worth pushing an update to fix the error text.
Comment 12 lnie 2014-01-23 04:24:49 EST
> I can modify this at the next update. I don't think it's worth pushing an
> update to fix the error text.
  yeah,agree
Comment 13 Fedora Update System 2014-01-24 02:46:44 EST
Package fpaste-0.3.7.1-11.fc19:
* should fix your issue,
* was pushed to the Fedora 19 testing repository,
* should be available at your local mirror within two days.
Update it with:
# su -c 'yum update --enablerepo=updates-testing fpaste-0.3.7.1-11.fc19'
as soon as you are able to.
Please go to the following url:
https://admin.fedoraproject.org/updates/FEDORA-2014-1440/fpaste-0.3.7.1-11.fc19
then log in and leave karma (feedback).
Comment 14 Fedora Update System 2014-01-24 21:23:06 EST
fpaste-0.3.7.1-11.fc19 has been pushed to the Fedora 19 stable repository.  If problems still persist, please make note of it in this bug report.
Comment 15 Andre Robatino 2014-01-24 22:16:01 EST
Bug still exists in F20 with fpaste-0.3.7.1-9.fc20.noarch.
Comment 16 Fedora Update System 2014-01-28 22:09:43 EST
fpaste-0.3.7.1-11.fc20 has been pushed to the Fedora 20 stable repository.  If problems still persist, please make note of it in this bug report.

Note You need to log in before you can comment on or make changes to this bug.