Skip to content

rflint fails with ImportError: No module named txtreader #1404

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

Closed
php-coder opened this issue May 23, 2020 · 3 comments
Closed

rflint fails with ImportError: No module named txtreader #1404

php-coder opened this issue May 23, 2020 · 3 comments
Assignees
Labels
ADR/needed A decision has been made and it needs to be documented area/build scripts kind/bug kind/regression
Milestone

Comments

@php-coder
Copy link
Owner

=====> Run robot framework lint

Traceback (most recent call last):
  File "/home/travis/.local/bin/rflint", line 5, in <module>
    from rflint.__main__ import main
  File "/home/travis/.local/lib/python2.7/site-packages/rflint/__init__.py", line 1, in <module>
    from .rflint import RfLint, ERROR, WARNING
  File "/home/travis/.local/lib/python2.7/site-packages/rflint/rflint.py", line 30, in <module>
    from .parser import RobotFactory, SuiteFile, ResourceFile
  File "/home/travis/.local/lib/python2.7/site-packages/rflint/parser/__init__.py", line 1, in <module>
    from .parser import (SuiteFolder, ResourceFile, SuiteFile, RobotFactory, 
  File "/home/travis/.local/lib/python2.7/site-packages/rflint/parser/parser.py", line 24, in <module>
    from robot.parsing.txtreader import TxtReader
ImportError: No module named txtreader

See there: https://travis-ci.org/github/php-coder/mystamps/jobs/690186467

@php-coder
Copy link
Owner Author

Upstream issue: boakley/robotframework-lint#73

@php-coder php-coder added the ADR/needed A decision has been made and it needs to be documented label Jun 1, 2020
php-coder added a commit that referenced this issue Jun 1, 2020
Correction for d8c6e3d commit.

Relate to #1404
@php-coder
Copy link
Owner Author

It seems like rflint 1.1 was released recently: https://pypi.org/project/robotframework-lint/1.1/

@php-coder
Copy link
Owner Author

With rflint 1.1 the build is broken again:

Traceback (most recent call last):
387  File "/home/travis/.local/bin/rflint", line 5, in <module>
388    from rflint.__main__ import main
389  File "/home/travis/.local/lib/python2.7/site-packages/rflint/__init__.py", line 1, in <module>
390    from .rflint import RfLint, ERROR, WARNING
391  File "/home/travis/.local/lib/python2.7/site-packages/rflint/rflint.py", line 30, in <module>
392    from .parser import RobotFactory, SuiteFile, ResourceFile
393  File "/home/travis/.local/lib/python2.7/site-packages/rflint/parser/__init__.py", line 1, in <module>
394    from .parser import (SuiteFolder, ResourceFile, SuiteFile, RobotFactory, 
395  File "/home/travis/.local/lib/python2.7/site-packages/rflint/parser/parser.py", line 25, in <module>
396    from robot.utils import FileReader
397ImportError: cannot import name FileReader

See https://travis-ci.org/github/php-coder/mystamps/jobs/697009225

It happens because rflint 1.1 doesn't work with robotframework 3.1.2 that we pin (I should pin both). We can install older rflint or unpin robotframework.

php-coder added a commit that referenced this issue Jun 10, 2020
This reverts workaround from d8c6e3d commit and pins
robotframework-lint in order to prevent CI failures after uncontrolled update in future.

Follow-up to #1404
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
ADR/needed A decision has been made and it needs to be documented area/build scripts kind/bug kind/regression
Projects
None yet
Development

No branches or pull requests

1 participant