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

Python 3.4 python extraction is totally broken. #72

Closed
ztane opened this issue Nov 8, 2015 · 0 comments
Closed

Python 3.4 python extraction is totally broken. #72

ztane opened this issue Nov 8, 2015 · 0 comments

Comments

@ztane
Copy link

ztane commented Nov 8, 2015

python extractor is completely broken with Python 3.4, lingua 4.3.1; throws on any file with more than 0 bytes.

% ls
total 0
% pot-create .
No files scanned, aborting
% echo > foo.py 
% pot-create . 
Traceback (most recent call last):
  File ".../venv/bin/pot-create", line 11, in <module>
    sys.exit(main())
  File ".../venv/lib/python3.4/site-packages/lingua/extract.py", line 280, in main
    for message in extractor(real_filename, options):
  File ".../venv/lib/python3.4/site-packages/lingua/extractors/python.py", line 349, in __call__
    return parser(token_stream, options, filename, lineno)
  File ".../venv/lib/python3.4/site-packages/lingua/extractors/python.py", line 164, in __call__
    for (token_type, token, location, _) in token_stream:
  File ".../venv/lib/python3.4/site-packages/lingua/extractors/python.py", line 138, in next
    token = self._transform(next(self.queue))
  File ".../venv/lib/python3.4/tokenize.py", line 554, in _tokenize
    if line[pos] in '#\r\n':           # skip comments or blank lines
TypeError: 'in <string>' requires string as left operand, not int
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant