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

Unable to start instance: "ImportError: cannot import name datetime" #12

Open
leowmjw opened this issue Mar 25, 2016 · 3 comments
Open

Comments

@leowmjw
Copy link

leowmjw commented Mar 25, 2016

When trying to start the Plone instance; fail as per below:

(virtualenv) vagrant@precise64:/vagrant$ ./bin/instance fg

Traceback (most recent call last):
  File "./bin/instance", line 271, in <module>
    import plone.recipe.zope2instance.ctl
  File "/vagrant/eggs/plone.recipe.zope2instance-4.2.18-py2.7.egg/plone/recipe/__init__.py", line 1, in <module>
    __import__('pkg_resources').declare_namespace(__name__)
  File "/vagrant/eggs/setuptools-18.5-py2.7.egg/pkg_resources/__init__.py", line 36, in <module>
    import plistlib
  File "/usr/lib/python2.7/plistlib.py", line 62, in <module>
    import datetime
  File "/vagrant/eggs/DateTime-3.0.3-py2.7.egg/datetime/__init__.py", line 13, in <module>
    from DateTime import DateTime
  File "/vagrant/eggs/DateTime-3.0.3-py2.7.egg/datetime/DateTime.py", line 24, in <module>
    from datetime import datetime
  File "/vagrant/eggs/DateTime-3.0.3-py2.7.egg/datetime/datetime.py", line 24, in <module>
    from datetime import datetime
ImportError: cannot import name datetime

When try workaround to remove the conflicting datetime; continues but has import ConfigParser problem:

(virtualenv) vagrant@precise64:/vagrant$ mv eggs/DateTime-3.0.3-py2.7.egg /tmp/.
(virtualenv) vagrant@precise64:/vagrant$ ./bin/instance fg

Traceback (most recent call last):
  File "./bin/instance", line 271, in <module>
    import plone.recipe.zope2instance.ctl
  File "/vagrant/eggs/plone.recipe.zope2instance-4.2.18-py2.7.egg/plone/recipe/zope2instance/__init__.py", line 24, in <module>
    import zc.buildout.easy_install
  File "/vagrant/eggs/zc.buildout-2.5.0-py2.7.egg/zc/buildout/easy_install.py", line 29, in <module>
    import setuptools.archive_util
  File "/vagrant/eggs/setuptools-18.5-py2.7.egg/setuptools/__init__.py", line 5, in <module>
    import distutils.core
  File "/usr/lib/python2.7/distutils/core.py", line 22, in <module>
    from distutils.config import PyPIRCCommand
  File "/usr/lib/python2.7/distutils/config.py", line 7, in <module>
    from ConfigParser import ConfigParser
ImportError: cannot import name ConfigParser
@kaerumy
Copy link
Member

kaerumy commented Mar 25, 2016

is virtualenv in vagrant without site-packages?

@leowmjw
Copy link
Author

leowmjw commented Mar 25, 2016

Yup, I think so, virtualenv is automatically generated for me by Otto, any quick way to check from within the virtualenv?

Sent from Outlook Mobilehttps://aka.ms/blhgte

From: Khairil Yusof
Sent: Friday, March 25, 10:57 PM
Subject: Re: [sinar.digimon] Unable to start instance: "ImportError: cannot import name datetime" (#12)
To: Sinar/sinar.digimon
Cc: leowmjw

is virtualenv in vagrant without site-packages?

You are receiving this because you authored the thread.
Reply to this email directly or view it on #12 (comment) GitHubhttps://github.com//issues/12#issuecomment-201321702

@leowmjw
Copy link
Author

leowmjw commented Apr 7, 2016

@kaerumy Continues to fail; even when I exit the virtualenv and when I matched the setuptools version exactly

vagrant@precise64:/vagrant$ ./bin/instance 
Traceback (most recent call last):
  File "./bin/instance", line 271, in <module>
    import plone.recipe.zope2instance.ctl
  File "/vagrant/eggs/plone.recipe.zope2instance-4.2.20-py2.7.egg/plone/recipe/zope2instance/__init__.py", line 24, in <module>
    import zc.buildout.easy_install
  File "/vagrant/eggs/zc.buildout-2.5.0-py2.7.egg/zc/buildout/easy_install.py", line 29, in <module>
    import setuptools.archive_util
  File "/vagrant/eggs/setuptools-20.2.2-py2.7.egg/setuptools/__init__.py", line 5, in <module>
    import distutils.core
  File "/usr/lib/python2.7/distutils/core.py", line 22, in <module>
    from distutils.config import PyPIRCCommand
  File "/usr/lib/python2.7/distutils/config.py", line 7, in <module>
    from ConfigParser import ConfigParser
ImportError: cannot import name ConfigParser

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

2 participants