TypeError: find_module() missing 1 required positional argument: 'path'

Bug #1881288 reported by Emilien Macchi on 2020-05-29
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
tripleo
Medium
Unassigned

Bug Description

openstack-tox-pep8 fails on tripleo-puppet-elements stable/queens:

https://d15b244a09e092074f42-99b702eb95f4b92006c274e662a2ede9.ssl.cf5.rackcdn.com/731338/2/check/openstack-tox-pep8/e800e71/job-output.txt

2020-05-28 21:45:31.880827 | ubuntu-xenial | pep8 installed: alabaster==0.7.10,appdirs==1.4.3,Babel==2.5.3,certifi==2018.1.18,chardet==3.0.4,docutils==0.14,dulwich==0.18.6,extras==1.0.0,fixtures==3.0.0,flake8==2.1.0,hacking==0.9.7,idna==2.6,imagesize==0.7.1,iso8601==0.1.12,Jinja2==2.10,keystoneauth1==3.4.1,linecache2==1.0.0,MarkupSafe==1.0,mccabe==0.2.1,mock==2.0.0,mox3==0.24.0,openstackdocstheme==1.22.0,os-client-config==1.29.0,oslotest==3.2.0,pbr==1.10.0,pep8==1.5.6,pyflakes==0.8.1,Pygments==2.2.0,python-mimeparse==1.6.0,python-subunit==1.2.0,pytz==2017.3,PyYAML==3.12,reno==2.7.0,requests==2.18.4,requestsexceptions==1.4.0,six==1.11.0,snowballstemmer==1.2.1,Sphinx==1.6.5,sphinxcontrib-websupport==1.0.1,stevedore==1.28.0,testrepository==0.0.20,testtools==2.3.0,traceback2==1.4.0,-e git+file:///dev/null@1cb4a8db0af23f6e7b787cd8b1ec8cd40022cae7#egg=tripleo_image_elements,unittest2==1.1.0,urllib3==1.22
2020-05-28 21:45:31.881458 | ubuntu-xenial | pep8 start: run-test-pre
2020-05-28 21:45:31.881713 | ubuntu-xenial | pep8 run-test-pre: PYTHONHASHSEED='247388151'
2020-05-28 21:45:31.881763 | ubuntu-xenial | pep8 finish: run-test-pre after 0.00 seconds
2020-05-28 21:45:31.881899 | ubuntu-xenial | pep8 start: run-test
2020-05-28 21:45:31.881985 | ubuntu-xenial | pep8 run-test: commands[0] | ./run-flake8
2020-05-28 21:45:31.882169 | ubuntu-xenial | setting PATH=/home/zuul/src/opendev.org/openstack/tripleo-image-elements/.tox/pep8/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin:/usr/games:/usr/local/games
2020-05-28 21:45:31.884019 | ubuntu-xenial | [2595] /home/zuul/src/opendev.org/openstack/tripleo-image-elements$ /home/zuul/src/opendev.org/openstack/tripleo-image-elements/run-flake8
2020-05-28 21:45:32.619037 | ubuntu-xenial | Traceback (most recent call last):
2020-05-28 21:45:32.619113 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-image-elements/.tox/pep8/bin/flake8", line 8, in <module>
2020-05-28 21:45:32.619150 | ubuntu-xenial | sys.exit(main())
2020-05-28 21:45:32.619180 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-image-elements/.tox/pep8/lib/python3.5/site-packages/flake8/main.py", line 32, in main
2020-05-28 21:45:32.619208 | ubuntu-xenial | report = flake8_style.check_files()
2020-05-28 21:45:32.619235 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-image-elements/.tox/pep8/lib/python3.5/site-packages/pep8.py", line 1670, in check_files
2020-05-28 21:45:32.619261 | ubuntu-xenial | self.input_dir(path)
2020-05-28 21:45:32.619288 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-image-elements/.tox/pep8/lib/python3.5/site-packages/pep8.py", line 1706, in input_dir
2020-05-28 21:45:32.619315 | ubuntu-xenial | runner(os.path.join(root, filename))
2020-05-28 21:45:32.619373 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-image-elements/.tox/pep8/lib/python3.5/site-packages/flake8/engine.py", line 73, in input_file
2020-05-28 21:45:32.619412 | ubuntu-xenial | return fchecker.check_all(expected=expected, line_offset=line_offset)
2020-05-28 21:45:32.619440 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-image-elements/.tox/pep8/lib/python3.5/site-packages/pep8.py", line 1436, in check_all
2020-05-28 21:45:32.619466 | ubuntu-xenial | self.check_logical()
2020-05-28 21:45:32.619493 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-image-elements/.tox/pep8/lib/python3.5/site-packages/pep8.py", line 1338, in check_logical
2020-05-28 21:45:32.619519 | ubuntu-xenial | for offset, text in self.run_check(check, argument_names) or ():
2020-05-28 21:45:32.619545 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-image-elements/.tox/pep8/lib/python3.5/site-packages/hacking/checks/imports.py", line 167, in hacking_import_rules
2020-05-28 21:45:32.619573 | ubuntu-xenial | if (current_mod != mod and not is_module(mod) and
2020-05-28 21:45:32.619599 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-image-elements/.tox/pep8/lib/python3.5/site-packages/hacking/checks/imports.py", line 124, in is_module
2020-05-28 21:45:32.619631 | ubuntu-xenial | res = is_module_for_sure(mod)
2020-05-28 21:45:32.619659 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-image-elements/.tox/pep8/lib/python3.5/site-packages/hacking/checks/imports.py", line 71, in is_module_for_sure
2020-05-28 21:45:32.619687 | ubuntu-xenial | if finder.find_module(mod) is not None:
2020-05-28 21:45:32.619713 | ubuntu-xenial | TypeError: find_module() missing 1 required positional argument: 'path'
2020-05-28 21:45:32.684417 | ubuntu-xenial | ERROR: InvocationError for command /home/zuul/src/opendev.org/openstack/tripleo-image-elements/run-flake8 (exited with code 1)
2020-05-28 21:45:32.684550 | ubuntu-xenial | pep8 finish: run-test after 0.80 seconds
2020-05-28 21:45:32.685039 | ubuntu-xenial | pep8 start: run-test-post
2020-05-28 21:45:32.685079 | ubuntu-xenial | pep8 finish: run-test-post after 0.00 seconds
2020-05-28 21:45:32.685496 | ubuntu-xenial | ___________________________________ summary ____________________________________
2020-05-28 21:45:32.685554 | ubuntu-xenial | ERROR: pep8: commands failed
2020-05-28 21:45:32.867639 | ubuntu-xenial | ERROR
2020-05-28 21:45:32.867986 | ubuntu-xenial | {
2020-05-28 21:45:32.868106 | ubuntu-xenial | "delta": "0:00:02.540672",
2020-05-28 21:45:32.868213 | ubuntu-xenial | "end": "2020-05-28 21:45:32.717110",
2020-05-28 21:45:32.868318 | ubuntu-xenial | "msg": "non-zero return code",
2020-05-28 21:45:32.868420 | ubuntu-xenial | "rc": 1,
2020-05-28 21:45:32.868522 | ubuntu-xenial | "start": "2020-05-28 21:45:30.176438"
2020-05-28 21:45:32.868622 | ubuntu-xenial | }

Sorin Sbarnea (ssbarnea) on 2020-05-29
Changed in tripleo:
assignee: nobody → Sorin Sbarnea (ssbarnea)
milestone: victoria-1 → none
Emilien Macchi (emilienm) wrote :
Changed in tripleo:
status: Triaged → In Progress
milestone: none → victoria-1
tags: added: queens-backport-potential

Reviewed: https://review.opendev.org/734614
Committed: https://git.openstack.org/cgit/openstack/tripleo-image-elements/commit/?id=018646a398e2798fe25dc06bac01e3ca4638e607
Submitter: Zuul
Branch: stable/queens

commit 018646a398e2798fe25dc06bac01e3ca4638e607
Author: Emilien Macchi <email address hidden>
Date: Tue Jun 9 10:19:16 2020 -0400

    Fixed queens pep8

    - fixed wrong url in constraints url
    - enforce use of python2.7 because that was the only supported version
      at that time. Code fails with python3.5

    Taken from https://review.opendev.org/#/c/731752

    Change-Id: Ieb6a897aa5801ea43bf6a9e2022dadbec3f5164a
    Related-Bug: #1881288

tags: added: in-stable-queens
Changed in tripleo:
milestone: victoria-1 → victoria-3
Changed in tripleo:
milestone: victoria-3 → wallaby-1
Changed in tripleo:
milestone: wallaby-1 → wallaby-2
Sorin Sbarnea (ssbarnea) on 2020-12-15
Changed in tripleo:
assignee: Sorin Sbarnea (ssbarnea) → nobody
status: In Progress → Confirmed
Marios Andreou (marios-b) wrote :

just got pinged about this on #tripleo by sorin zbr|rover

It seems that this is not a consistent issue [1]. In fact, taking the top failure from [1] right now I am not sure it is even the same bug as reported in the description here. At [2] the trace is like "AttributeError: module 'ruamel.yaml' has no attribute 'YAML'" :

                2020-12-15 09:36:48.402751 | ubuntu-xenial | Traceback (most recent call last):
  2020-12-15 09:36:48.402797 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/bin/ansible-lint", line 8, in <module>
  2020-12-15 09:36:48.402831 | ubuntu-xenial | sys.exit(main())
  2020-12-15 09:36:48.402853 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/__main__.py", line 187, in main
  2020-12-15 09:36:48.402878 | ubuntu-xenial | matches.extend(runner.run())
  2020-12-15 09:36:48.402901 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/__init__.py", line 282, in run
  2020-12-15 09:36:48.402922 | ubuntu-xenial | skip_list=self.skip_list))
  2020-12-15 09:36:48.402942 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/__init__.py", line 174, in run
  2020-12-15 09:36:48.402961 | ubuntu-xenial | matches.extend(rule.matchtasks(playbookfile, text))
  2020-12-15 09:36:48.402980 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/__init__.py", line 84, in matchtasks
  2020-12-15 09:36:48.403008 | ubuntu-xenial | yaml = ansiblelint.utils.append_skipped_rules(yaml, text, file['type'])
  2020-12-15 09:36:48.403032 | ubuntu-xenial | File "/home/zuul/src/opendev.org/openstack/tripleo-validations/.tox/pep8/lib/python3.5/site-packages/ansiblelint/utils.py", line 603, in append_skipped_rules
  2020-12-15 09:36:48.403054 | ubuntu-xenial | yaml = ruamel.yaml.YAML()
  2020-12-15 09:36:48.403074 | ubuntu-xenial | AttributeError: module 'ruamel.yaml' has no attribute 'YAML'

[1] http://dashboard-ci.tripleo.org/d/3-DYSmOGk/jobs-exploration?orgId=1&var-influxdb_filter=job_name%7C%3D%7Copenstack-tox-pep8&var-influxdb_filter=branch%7C%3D%7Cstable%2Fqueens
[2] https://storage.gra.cloud.ovh.net/v1/AUTH_dcaab5e32b234d56b626f72581e3644c/zuul_opendev_logs_4b0/767087/1/check/openstack-tox-pep8/4b0f938/job-output.txt

Changed in tripleo:
milestone: wallaby-2 → wallaby-3
Changed in tripleo:
milestone: wallaby-3 → wallaby-rc1
Changed in tripleo:
milestone: wallaby-rc1 → xena-1
To post a comment you must log in.
This report contains Public information  Edit
Everyone can see this information.

Other bug subscribers