Skip to content

Error: too many values to unpack (expected 2) #86

@RuABraun

Description

@RuABraun

Python 3.7.6, running example:

sending function jobs to cluster

Traceback (most recent call last):
  File "testb.py", line 113, in <module>
    main()
  File "testb.py", line 105, in main
    job_outputs = process_jobs(functionJobs, max_processes=4)
  File "/idiap/temp/rbraun/programs/anaconda3/lib/python3.7/site-packages/gridmap/job.py", line 887, in process_jobs
    with JobMonitor(temp_dir=temp_dir) as monitor:
  File "/idiap/temp/rbraun/programs/anaconda3/lib/python3.7/site-packages/gridmap/job.py", line 299, in __init__
    for _, _, _, _, (ip, _) in getaddrinfo(getfqdn(), 0):
ValueError: too many values to unpack (expected 2)

I fixed it by changing the code to

for _, _, _, _, tpl in getaddrinfo(getfqdn(), 0):
    if len(tpl) > 2:
        continue
    ip = tpl[0]

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions