You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
When running pycco file, it works well when the file is named foo.py, but does not work for foo despite having a shebang.
Example Script
Create this file as example. Note that if it is named example.py, everything works as expected.
#!/usr/bin/env python3importosclassCommandLineFlag(object):
'''Holds information about a command-line argument'''
Pycco Output
$ pycco example
Traceback (most recent call last):
File "/Users/zachriggle/Library/Python/3.8/lib/python/site-packages/pycco/main.py", line 397, in get_language
raise ValueError()
ValueError
During handling of the above exception, another exception occurred:
Traceback (most recent call last):
File "/Users/zachriggle/Library/Python/3.8/bin/pycco", line 10, in <module>
sys.exit(main())
File "/Users/zachriggle/Library/Python/3.8/lib/python/site-packages/pycco/main.py", line 629, in main
process(args.sources, outdir=outdir, preserve_paths=args.paths,
File "/Users/zachriggle/Library/Python/3.8/lib/python/site-packages/pycco/main.py", line 533, in process
next_file()
File "/Users/zachriggle/Library/Python/3.8/lib/python/site-packages/pycco/main.py", line 518, in next_file
f.write(generate_documentation(s, preserve_paths=preserve_paths,
File "/Users/zachriggle/Library/Python/3.8/lib/python/site-packages/pycco/main.py", line 80, in generate_documentation
return _generate_documentation(source, code, outdir, preserve_paths, language)
File "/Users/zachriggle/Library/Python/3.8/lib/python/site-packages/pycco/main.py", line 87, in _generate_documentation
language = get_language(file_path, code, language_name=language)
File "/Users/zachriggle/Library/Python/3.8/lib/python/site-packages/pycco/main.py", line 402, in get_language
raise ValueError("Can't figure out the language!")
ValueError: Can't figure out the language!
The text was updated successfully, but these errors were encountered:
When running
pycco file
, it works well when the file is namedfoo.py
, but does not work forfoo
despite having a shebang.Example Script
Create this file as
example
. Note that if it is namedexample.py
, everything works as expected.Pycco Output
The text was updated successfully, but these errors were encountered: