Bug 1342371 - ‘ImportError: cannot import name find_spec’ error in django app with python-33-rhel7
Summary: ‘ImportError: cannot import name find_spec’ error in django app with python-3...
Alias: None
Product: OpenShift Container Platform
Classification: Red Hat
Component: ImageStreams
Version: 3.2.1
Hardware: Unspecified
OS: Unspecified
Target Milestone: ---
: ---
Assignee: Victor Ionut Palade
QA Contact: Wang Haoran
Depends On:
TreeView+ depends on / blocked
Reported: 2016-06-03 06:09 UTC by XiuJuan Wang
Modified: 2016-09-27 09:33 UTC (History)
5 users (show)

Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Clone Of:
Last Closed: 2016-09-27 09:33:39 UTC
Target Upstream Version:

Attachments (Terms of Use)

System ID Private Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1933 0 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 13:24:36 UTC

Description XiuJuan Wang 2016-06-03 06:09:26 UTC
Description of problem:
‘ImportError: cannot import name find_spec’ error in django app building with python-33-rhel7
Works with python-27-rhel7 and python-34-rhel7 images

$oc  logs django-ex-1-xb9uw 
WARNING: file 'app.py' not found.
---> Migrating database ...
Traceback (most recent call last):
  File "manage.py", line 8, in <module>
    from django.core.management import execute_from_command_line
  File "/opt/app-root/src/.local/lib/python3.3/site-packages/django/core/management/__init__.py", line 10, in <module>
    from django.apps import apps
  File "/opt/app-root/src/.local/lib/python3.3/site-packages/django/apps/__init__.py", line 1, in <module>
    from .config import AppConfig
  File "/opt/app-root/src/.local/lib/python3.3/site-packages/django/apps/config.py", line 6, in <module>
    from django.utils.module_loading import module_has_submodule
  File "/opt/app-root/src/.local/lib/python3.3/site-packages/django/utils/module_loading.py", line 67, in <module>
    from importlib.util import find_spec as importlib_find
ImportError: cannot import name find_spec

Version-Release number of selected component (if applicable):
openshift3/python-33-rhel7 imageid:c4c2002ed9d2

How reproducible:

Steps to Reproduce:
1.Create a django app with python 3.3
oc new-app openshift/python:3.3 https://github.com/openshift/django-ex.git
2.Check app pod

Actual results:
Pod can't be running with description error.

Expected results:
Pod should be running.

Additional info:

Comment 1 Ben Parees 2016-06-05 02:29:31 UTC
Victor can you take a look? not sure if this is related to some of the other dep level changes you've been looking into.

Comment 2 Ben Parees 2016-06-05 02:30:07 UTC
(appears to be broken for the centos image too, so you can use that for an easy recreate)

Comment 3 Ben Parees 2016-06-27 14:59:29 UTC
fix to the django-ex repository has merged, this should work now.

Comment 4 XiuJuan Wang 2016-06-28 02:18:17 UTC
This bug has been fixed.
No error when Python-33-rhel7 (4b230da580ce) image build with https://github.com/openshift/django-ex.git

Comment 6 errata-xmlrpc 2016-09-27 09:33:39 UTC
Since the problem described in this bug report should be
resolved in a recent advisory, it has been closed with a
resolution of ERRATA.

For information on the advisory, and where to find the updated
files, follow the link below.

If the solution does not work for you, open a new bug report.


Note You need to log in before you can comment on or make changes to this bug.