Bug 1342371

Summary: ‘ImportError: cannot import name find_spec’ error in django app with python-33-rhel7
Product: OpenShift Container Platform Reporter: XiuJuan Wang <xiuwang>
Component: ImageStreamsAssignee: Victor Ionut Palade <ipalade>
Status: CLOSED ERRATA QA Contact: Wang Haoran <haowang>
Severity: medium Docs Contact:
Priority: medium    
Version: 3.2.1CC: aos-bugs, bparees, jokerman, mmccomas, tdawson
Target Milestone: ---   
Target Release: ---   
Hardware: Unspecified   
OS: Unspecified   
Fixed In Version: Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of: Environment:
Last Closed: 2016-09-27 09:33:39 UTC Type: Bug
Regression: --- Mount Type: ---
Documentation: --- CRM:
Verified Versions: Category: ---
oVirt Team: --- RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: --- Target Upstream Version:

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.