Bugzilla will be upgraded to version 5.0. The upgrade date is tentatively scheduled for 2 December 2018, pending final testing and feedback.
Bug 1342371 - ‘ImportError: cannot import name find_spec’ error in django app with python-33-rhel7
‘ImportError: cannot import name find_spec’ error in django app with python-3...
Status: CLOSED ERRATA
Product: OpenShift Container Platform
Classification: Red Hat
Component: Image (Show other bugs)
3.2.1
Unspecified Unspecified
medium Severity medium
: ---
: ---
Assigned To: Victor Ionut Palade
Wang Haoran
:
Depends On:
Blocks:
  Show dependency treegraph
 
Reported: 2016-06-03 02:09 EDT by XiuJuan Wang
Modified: 2016-09-27 05:33 EDT (History)
5 users (show)

See Also:
Fixed In Version:
Doc Type: If docs needed, set a value
Doc Text:
Story Points: ---
Clone Of:
Environment:
Last Closed: 2016-09-27 05:33:39 EDT
Type: Bug
Regression: ---
Mount Type: ---
Documentation: ---
CRM:
Verified Versions:
Category: ---
oVirt Team: ---
RHEL 7.3 requirements from Atomic Host:
Cloudforms Team: ---


Attachments (Terms of Use)


External Trackers
Tracker ID Priority Status Summary Last Updated
Red Hat Product Errata RHBA-2016:1933 normal SHIPPED_LIVE Red Hat OpenShift Container Platform 3.3 Release Advisory 2016-09-27 09:24:36 EDT

  None (edit)
Description XiuJuan Wang 2016-06-03 02:09:26 EDT
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:
always

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
3.

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


Expected results:
Pod should be running.

Additional info:
Comment 1 Ben Parees 2016-06-04 22:29:31 EDT
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-04 22:30:07 EDT
(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 10:59:29 EDT
fix to the django-ex repository has merged, this should work now.
Comment 4 XiuJuan Wang 2016-06-27 22:18:17 EDT
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 05:33:39 EDT
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.

https://access.redhat.com/errata/RHBA-2016:1933

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