Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

New Option '--skip-null' causes ValueError raised by argparse.py #19

Closed
stefan-rademacher-tk opened this issue Mar 23, 2020 · 2 comments · Fixed by #24
Closed

New Option '--skip-null' causes ValueError raised by argparse.py #19

stefan-rademacher-tk opened this issue Mar 23, 2020 · 2 comments · Fixed by #24
Assignees
Labels
🐛 bug Something isn't working

Comments

@stefan-rademacher-tk
Copy link

Hi,

since these lines (7e11e7c#diff-8cf96b3efbca5b77c8394b54670de4ddR93-R94) were added, I get an error, running the script:

Traceback (most recent call last):
  File "./SAMLTeamSyncAD.py", line 197, in <module>
    main()
  File "./SAMLTeamSyncAD.py", line 94, in main
    help="Skip empty groups in Active Directory, to avoid emptying the GitHub group")
  File "/usr/lib/python3.7/argparse.py", line 1362, in add_argument
    action = action_class(**kwargs)
  File "/usr/lib/python3.7/argparse.py", line 869, in __init__
    raise ValueError('nargs must be %r to supply const' % OPTIONAL)
ValueError: nargs must be '?' to supply const

I have these python modules installed:

Package           Version   
----------------- ----------
certifi           2019.11.28
cffi              1.14.0    
chardet           3.0.4     
cryptography      2.8       
defusedxml        0.6.0     
Deprecated        1.2.7     
idna              2.9       
jira              2.0.0     
ldap3             2.7       
oauthlib          3.1.0     
pbr               5.4.4     
pip               20.0.2    
pyasn1            0.4.8     
pycparser         2.20      
PyGithub          1.47      
PyJWT             1.7.1     
PyYAML            5.3.1     
requests          2.23.0    
requests-oauthlib 1.3.0     
requests-toolbelt 0.9.1     
setuptools        46.0.0    
six               1.14.0    
urllib3           1.25.8    
wrapt             1.12.1    

The error occurs, no matter if I run the script with or without --skip-null option.
I didn't take the time yet, to dive deeper. Does anyone know, why this is happening?

@timhirsh
Copy link

I'm seeing the same thing. It looks like this was introduced in #17, which was a partial fix for #6.

@primetheus primetheus added the 🐛 bug Something isn't working label Mar 24, 2020
@primetheus primetheus self-assigned this Mar 24, 2020
@primetheus
Copy link
Collaborator

@stefan-rademacher-tk @timhirsh this is fixed in #24. Thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
🐛 bug Something isn't working
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants