build/scripts/avro: line 243:
opts, args = parser.parse_args(argv[1:])
Pdb) c
> /home/tony/AVRO/avro-FromFreshIBMSOEGitHub/lang/py/build/scripts/avro(243)main()
-> opts, args = parser.parse_args(argv[1:])
(Pdb) n
...
(Pdb) p opts
<Values at 0x3fff9b8274d0: {'count': inf, 'format': 'json', 'skip': 0, 'input_type': None, 'print_schema': False, 'filter': None, 'header': False, 'fields': 'first, last', 'output': '-', 'schema': None}>
(Pdb) p args
['cat', '/tmp/REIX']
.......
(Pdb) n
> /home/tony/AVRO/avro-FromFreshIBMSOEGitHub/lang/py/build/scripts/avro(125)cat()
-> print_avro(avro, opts)
(Pdb) n
{"last": "duck", "first": "daffy"}
{"last": "bunny", "first": "bugs"}
{"last": "", "first": "tweety"}
{"last": "runner", "first": "road"}
{"last": "e", "first": "wile"}
{"last": "le pew", "first": "pepe"}
{"last": "leghorn", "first": "foghorn"}
> /home/tony/AVRO/avro-FromFreshIBMSOEGitHub/lang/py/build/scripts/avro(113)cat()
-> for filename in args:
(Pdb) n
--Return--
> /home/tony/AVRO/avro-FromFreshIBMSOEGitHub/lang/py/build/scripts/avro(113)cat()->None
-> for filename in args:
(Pdb) n
--Return--
> /home/tony/AVRO/avro-FromFreshIBMSOEGitHub/lang/py/build/scripts/avro(250)main()->None
-> cat(opts, args)
(Pdb) n
--Return--
> /home/tony/AVRO/avro-FromFreshIBMSOEGitHub/lang/py/build/scripts/avro(261)<module>()->None
-> main()
(Pdb) n
--Return--
> <string>(1)<module>()->None
(Pdb) n
The program finished and will be restarted
Launching the same command withoug pdb:
../../lang/py/build/scripts/avro cat /tmp/REIX --fields 'first, last'
raised the same issue:
I've tried to use PDb on Ubuntu/PPC64LE for debugging the issue.
However, with Pdb, the issue disappears...
We have in "opts" variable the correct value for fields: 'fields': 'first, last'
$ pdb ../../lang/ py/build/ scripts/ avro cat /tmp/REIX --fields 'first, last'
build/scripts/avro: line 243: parse_args( argv[1: ])
opts, args = parser.
Pdb) c AVRO/avro- FromFreshIBMSOE GitHub/ lang/py/ build/scripts/ avro(243) main() parse_args( argv[1: ])
> /home/tony/
-> opts, args = parser.
(Pdb) n
...
(Pdb) p opts
<Values at 0x3fff9b8274d0: {'count': inf, 'format': 'json', 'skip': 0, 'input_type': None, 'print_schema': False, 'filter': None, 'header': False, 'fields': 'first, last', 'output': '-', 'schema': None}>
(Pdb) p args
['cat', '/tmp/REIX']
.......
(Pdb) n AVRO/avro- FromFreshIBMSOE GitHub/ lang/py/ build/scripts/ avro(125) cat() AVRO/avro- FromFreshIBMSOE GitHub/ lang/py/ build/scripts/ avro(113) cat() AVRO/avro- FromFreshIBMSOE GitHub/ lang/py/ build/scripts/ avro(113) cat()-> None AVRO/avro- FromFreshIBMSOE GitHub/ lang/py/ build/scripts/ avro(250) main()- >None AVRO/avro- FromFreshIBMSOE GitHub/ lang/py/ build/scripts/ avro(261) <module> ()->None (1)<module> ()->None
> /home/tony/
-> print_avro(avro, opts)
(Pdb) n
{"last": "duck", "first": "daffy"}
{"last": "bunny", "first": "bugs"}
{"last": "", "first": "tweety"}
{"last": "runner", "first": "road"}
{"last": "e", "first": "wile"}
{"last": "le pew", "first": "pepe"}
{"last": "leghorn", "first": "foghorn"}
> /home/tony/
-> for filename in args:
(Pdb) n
--Return--
> /home/tony/
-> for filename in args:
(Pdb) n
--Return--
> /home/tony/
-> cat(opts, args)
(Pdb) n
--Return--
> /home/tony/
-> main()
(Pdb) n
--Return--
> <string>
(Pdb) n
The program finished and will be restarted
Launching the same command withoug pdb: ../lang/ py/build/ scripts/ avro cat /tmp/REIX --fields 'first, last'
../
raised the same issue:
{"first": "daffy"}
{"first": "bugs"}
{"first": "tweety"}
{"first": "road"}
{"first": "wile"}
{"first": "pepe"}
{"first": "foghorn"}
Usage: avro cat|write [options] FILE [FILE...]
avro: error: Can't open last - [Errno 2] No such file or directory: 'last'