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

Errors in argument handling #401

Open
nchaimov opened this issue Sep 25, 2021 · 2 comments
Open

Errors in argument handling #401

nchaimov opened this issue Sep 25, 2021 · 2 comments

Comments

@nchaimov
Copy link
Member

@brnorris03 reports that in the unstable branch the command

tau init --backend sqlite --mpi F --bare
tau target create colabvm

Result in an error:

[TAU] XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX
[TAU] 
[TAU] CRITICAL
[TAU] 
[TAU] An unexpected AttributeError exception was raised:
[TAU] 
[TAU] module 'urllib' has no attribute 'parse'
[TAU] 
[TAU] Traceback (most recent call last):
[TAU]   File 
[TAU]     "/disks/large/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/system/../packages/taucmdr/cli/arguments.py",
[TAU]      line 475, in __call__
[TAU]     value_as_bool = util.parse_bool(value, additional_true=['download', 'download-tr4', 'download-tr6', 'nightly'])
[TAU]   File 
[TAU]     "/disks/large/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/system/../packages/taucmdr/util.py",
[TAU]      line 687, in parse_bool
[TAU]     raise TypeError
[TAU] TypeError
[TAU] 
[TAU] During handling of the above exception, another exception occurred:
[TAU] 
[TAU] Traceback (most recent call last):
[TAU]   File "/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/system/configure", line 216, in
[TAU]      <module>
[TAU]     sys.exit(main(sys.argv[1:]))
[TAU]   File "/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/system/configure", line 205, in
[TAU]      main
[TAU]     tau_prefix = _configure_full(args)
[TAU]   File "/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/system/configure", line 168, in
[TAU]      _configure_full
[TAU]     _configure_project(args)
[TAU]   File "/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/system/configure", line 97, in 
[TAU]     _configure_project
[TAU]     if _execute(initialize_cmd, argv) != EXIT_SUCCESS:
[TAU]   File "/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/system/configure", line 84, in 
[TAU]     _execute
[TAU]     return cmd.main(argv)
[TAU]   File 
[TAU]     "/disks/large/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/system/../packages/taucmdr/cli/commands/initialize.py",
[TAU]      line 233, in main
[TAU]     args = self._parse_args(argv)
[TAU]   File 
[TAU]     "/disks/large/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/system/../packages/taucmdr/cli/command.py",
[TAU]      line 85, in _parse_args
[TAU]     args = self.parser.parse_args(args=argv)
[TAU]   File 
[TAU]     "/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/conda/lib/python3.7/argparse.py", 
[TAU]     line 1755, in parse_args
[TAU]     args, argv = self.parse_known_args(args, namespace)
[TAU]   File 
[TAU]     "/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/conda/lib/python3.7/argparse.py", 
[TAU]     line 1787, in parse_known_args
[TAU]     namespace, args = self._parse_known_args(args, namespace)
[TAU]   File 
[TAU]     "/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/conda/lib/python3.7/argparse.py", 
[TAU]     line 1993, in _parse_known_args
[TAU]     start_index = consume_optional(start_index)
[TAU]   File 
[TAU]     "/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/conda/lib/python3.7/argparse.py", 
[TAU]     line 1933, in consume_optional
[TAU]     take_action(action, args, option_string)
[TAU]   File 
[TAU]     "/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/conda/lib/python3.7/argparse.py", 
[TAU]     line 1861, in take_action
[TAU]     action(self, namespace, argument_values, option_string)
[TAU]   File 
[TAU]     "/disks/large/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/system/../packages/taucmdr/cli/arguments.py",
[TAU]      line 477, in __call__
[TAU]     if not util.is_url(value):
[TAU]   File 
[TAU]     "/disks/large/home/users/norris/performance/PythonPerformanceAnalysis/tools/taucmdr/installed/system/../packages/taucmdr/util.py",
[TAU]      line 700, in is_url
[TAU]     return bool(len(urllib.parse.urlparse(url).scheme))
[TAU] AttributeError: module 'urllib' has no attribute 'parse'
[TAU] 
[TAU] This is a bug in TAU Commander.
[TAU] Please send '/disks/large/home/users/norris/.local/taucmdr/debug_log' to <[email protected]> for assistance.
[TAU] 
[TAU] XXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXXX

I'm not immediately sure whether the real problem is the TypeError in parse_bool or the AttributeError in is_url. The error in is_url seems strange, because it reports that module 'urllib' has no attribute 'parse' despite that module having been imported in the same file.

import urllib.parse

@nchaimov
Copy link
Member Author

Debug log: debug_log.txt

@khsa1
Copy link
Contributor

khsa1 commented Oct 17, 2021

It looks to me like the urllib error in is_url is the real issue. The TypeError exception in parse_bool is being caught and that is why is_url is called. Is this reproducible? I haven't been able to reproduce this issue yet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants