yichen0831 / opencc-python

OpenCC made with Python
Apache License 2.0
536 stars 67 forks source link

fixed: TypeError: 'encoding' is an invalid keyword argument for this … #18

Closed chetien closed 5 years ago

chetien commented 5 years ago

Fixed the below error while invoking opencc from command line:

python -m opencc -c t2s --in-enc utf-8 --out-enc ascii -i ~/1 -o my_traditional_output_file.txt Traceback (most recent call last): File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 162, in _run_module_as_main "main", fname, loader, pkg_name) File "/System/Library/Frameworks/Python.framework/Versions/2.7/lib/python2.7/runpy.py", line 72, in _run_code exec code in run_globals File "/Library/Python/2.7/site-packages/opencc/main.py", line 40, in sys.exit(main()) File "/Library/Python/2.7/site-packages/opencc/main.py", line 29, in main with open(args.input if args.input else 0, encoding=args.in_enc) as f:

Hopkins1 commented 5 years ago

Dupe of #16