Bug 1077805 - [abrt] bpython: cli.py:1921:main:ValueError: need more than 1 value to unpack
Summary: [abrt] bpython: cli.py:1921:main:ValueError: need more than 1 value to unpack
Keywords:
Status: CLOSED DUPLICATE of bug 983658
Alias: None
Product: Fedora
Classification: Fedora
Component: bpython
Version: 20
Hardware: x86_64
OS: Unspecified
unspecified
unspecified
Target Milestone: ---
Assignee: Terje Røsten
QA Contact: Fedora Extras Quality Assurance
URL: https://retrace.fedoraproject.org/faf...
Whiteboard: abrt_hash:ada9c4c2605db09163066127fb9...
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2014-03-18 15:21 UTC by Jacek Wielemborek
Modified: 2014-08-11 19:15 UTC (History)
1 user (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2014-08-11 19:15:43 UTC
Type: ---
Embargoed:


Attachments (Terms of Use)
File: backtrace (821 bytes, text/plain)
2014-03-18 15:21 UTC, Jacek Wielemborek
no flags Details
File: environ (3.77 KB, application/octet-stream)
2014-03-18 15:21 UTC, Jacek Wielemborek
no flags Details

Description Jacek Wielemborek 2014-03-18 15:21:47 UTC
Description of problem:
I ran "bpython mycode.py". Here's the file:

#!/usr/bin/python

# You can get the CSV files from here:
# https://www.google-melange.com/gsoc/projects/list/google/gsoc2009
# click "CSV export" and then change 2009 in the URL to 2010, up to 2013
import csv

by_student = {}
by_project = {}
by_mentor = {}
by_organization = {}
by_year = {}

def add_to_dict(dict_, key, project_dict):
    if not key in dict_:
        dict_[key] = [project_dict]
    else:
        dict_[key] += [project_dict]

def parse_row(row, year):
    global by_student, by_project, by_mentor, by_organization, by_year
    project_dict = {}
    project_dict['year'] = year
    project_dict['project_id'] = row[0]
    project_dict['student_name'] = row[1]
    project_dict['project_name'] = row[2]
    project_dict['organization_name'] = row[3]
    status = row[4]
    assert(status == "accepted")
    project_dict['mentor_name'] = row[5]
    add_to_dict(by_student, project_dict['student_name'], project_dict)
    add_to_dict(by_mentor, project_dict['mentor_name'], project_dict)
    add_to_dict(by_project, project_dict['project_name'], project_dict)
    add_to_dict(by_organization, project_dict['organization_name'], project_dict)
    add_to_dict(by_year, year, project_dict)

for year in range(2009,2014):
    with open("%s.csv" % year) as csvfile:
        r = csv.reader(csvfile)
        skipped = False
        for row in r:
            if not skipped:
                skipped = True
            else:
                parse_row(row, year)

Version-Release number of selected component:
bpython-0.12-4.fc20

Additional info:
reporter:       libreport-2.2.0
cmdline:        /usr/bin/python2 /usr/bin/bpython parse.py
executable:     /usr/bin/bpython
kernel:         3.9.6-200.fc18.x86_64
runlevel:       N 5
type:           Python
uid:            1000

Truncated backtrace:
cli.py:1921:main:ValueError: need more than 1 value to unpack

Traceback (most recent call last):
  File "/usr/bin/bpython", line 9, in <module>
    load_entry_point('bpython==0.12', 'console_scripts', 'bpython')()
  File "/usr/lib/python2.7/site-packages/bpython/cli.py", line 1921, in main
    banner=banner)
ValueError: need more than 1 value to unpack

Local variables in innermost frame:
orig_stdin: <open file '<stdin>', mode 'r' at 0x7f9cd2d4f0c0>
banner: None
args: None
locals_: None
orig_stderr: <open file '<stderr>', mode 'w' at 0x7f9cd2d4f1e0>
orig_stdout: <open file '<stdout>', mode 'w' at 0x7f9cd2d4f150>
exec_args: ['parse.py']
config: <bpython.config.Struct object at 0x1d9c350>
options: <Values at 0x1d5fb00: {'version': None, 'config': '~/.config/bpython/config', 'quiet': None, 'interactive': None}>

Comment 1 Jacek Wielemborek 2014-03-18 15:21:52 UTC
Created attachment 876004 [details]
File: backtrace

Comment 2 Jacek Wielemborek 2014-03-18 15:21:54 UTC
Created attachment 876005 [details]
File: environ

Comment 3 Terje Røsten 2014-08-11 19:15:43 UTC

*** This bug has been marked as a duplicate of bug 983658 ***


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