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

ModuleFinder error #349

Open
onionka opened this issue Oct 29, 2015 · 1 comment
Open

ModuleFinder error #349

onionka opened this issue Oct 29, 2015 · 1 comment

Comments

@onionka
Copy link
Member

onionka commented Oct 29, 2015

I was building hawkey and these errors came up. The last one happened, because we are checking imports for python2 from python3 environment, so when module finder tries to compile python2 file, exception will be thrown, that it has wrong syntax.

[17:58:32] {/home/onionka/Projects/rpg/rpg/plugins/lang/python.py:21} WARNING - Exception was raised by ModuleFinder:
relative importpath too deep
On file: /tmp/rpg-hawkey-f9d0b4e/extracted/tests/python/tests/test_util.py
[17:58:32] {/home/onionka/Projects/rpg/rpg/plugins/lang/python.py:21} WARNING - Exception was raised by ModuleFinder:
relative importpath too deep
On file: /tmp/rpg-hawkey-f9d0b4e/extracted/tests/python/tests/test_subject.py
[17:58:34] {/home/onionka/Projects/rpg/rpg/plugins/lang/python.py:21} WARNING - Exception was raised by ModuleFinder:
relative importpath too deep
On file: /tmp/rpg-hawkey-f9d0b4e/extracted/tests/python/tests/test_sack.py
[17:58:36] {/home/onionka/Projects/rpg/rpg/plugins/lang/python.py:21} WARNING - Exception was raised by ModuleFinder:
relative importpath too deep
On file: /tmp/rpg-hawkey-f9d0b4e/extracted/tests/python/tests/test_reldep.py
[17:58:36] {/home/onionka/Projects/rpg/rpg/plugins/lang/python.py:21} WARNING - Exception was raised by ModuleFinder:
relative importpath too deep
On file: /tmp/rpg-hawkey-f9d0b4e/extracted/tests/python/tests/test_query.py
[17:58:36] {/home/onionka/Projects/rpg/rpg/plugins/lang/python.py:21} WARNING - Exception was raised by ModuleFinder:
relative importpath too deep
On file: /tmp/rpg-hawkey-f9d0b4e/extracted/tests/python/tests/test_package.py
[17:58:37] {/home/onionka/Projects/rpg/rpg/plugins/lang/python.py:21} WARNING - Exception was raised by ModuleFinder:
relative importpath too deep
On file: /tmp/rpg-hawkey-f9d0b4e/extracted/tests/python/tests/test_goal.py
[17:58:37] {/home/onionka/Projects/rpg/rpg/plugins/lang/python.py:21} WARNING - Exception was raised by ModuleFinder:
relative importpath too deep
On file: /tmp/rpg-hawkey-f9d0b4e/extracted/tests/python/tests/test_advisoryref.py
[17:58:37] {/home/onionka/Projects/rpg/rpg/plugins/lang/python.py:21} WARNING - Exception was raised by ModuleFinder:
relative importpath too deep
On file: /tmp/rpg-hawkey-f9d0b4e/extracted/tests/python/tests/test_advisorypkg.py
[17:58:37] {/home/onionka/Projects/rpg/rpg/plugins/lang/python.py:21} WARNING - Exception was raised by ModuleFinder:
relative importpath too deep
On file: /tmp/rpg-hawkey-f9d0b4e/extracted/tests/python/tests/test_advisory.py
[17:58:38] {/home/onionka/Projects/rpg/rpg/plugins/lang/python.py:21} WARNING - Exception was raised by ModuleFinder:
relative importpath too deep
On file: /tmp/rpg-hawkey-f9d0b4e/extracted/tests/python/module/__init__.py
[17:58:38] {/home/onionka/Projects/rpg/rpg/plugin_engine.py:60} WARNING - error during executing plugin PythonPlugin:
invalid syntax (dbg.py, line 28)
  File "/home/onionka/Projects/rpg/rpg/plugin_engine.py", line 54, in execute_phase
    method(project_dir, self.spec, self.sack)
  File "/home/onionka/Projects/rpg/rpg/plugins/lang/python.py", line 15, in patched
    mod.run_script(str(item))
  File "/usr/lib64/python3.4/modulefinder.py", line 111, in run_script
    self.load_module('__main__', fp, pathname, stuff)
  File "/usr/lib64/python3.4/modulefinder.py", line 289, in load_module
    co = compile(fp.read()+'\n', pathname, 'exec')
@onionka
Copy link
Member Author

onionka commented Oct 29, 2015

I have a solution ... we can run external command in proper python environment. For that we have to find out version of python they used.

onionka added a commit to onionka/rpg that referenced this issue Nov 11, 2015
onionka added a commit to onionka/rpg that referenced this issue Feb 3, 2016
onionka added a commit to onionka/rpg that referenced this issue Feb 6, 2016
onionka added a commit to onionka/rpg that referenced this issue Feb 10, 2016
onionka added a commit to onionka/rpg that referenced this issue Feb 24, 2016
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