Skip to content
GitLab
  • Menu
Projects Groups Snippets
  • Help
    • Help
    • Support
    • Community forum
    • Submit feedback
    • Contribute to GitLab
  • Sign in
  • bob.buildout bob.buildout
  • Project information
    • Project information
    • Activity
    • Labels
    • Members
  • Repository
    • Repository
    • Files
    • Commits
    • Branches
    • Tags
    • Contributors
    • Graph
    • Compare
  • Issues 3
    • Issues 3
    • List
    • Boards
    • Service Desk
    • Milestones
  • Merge requests 0
    • Merge requests 0
  • CI/CD
    • CI/CD
    • Pipelines
    • Jobs
    • Schedules
  • Deployments
    • Deployments
    • Environments
    • Releases
  • Monitor
    • Monitor
    • Incidents
  • Analytics
    • Analytics
    • Value stream
    • CI/CD
    • Repository
  • Activity
  • Graph
  • Create a new issue
  • Jobs
  • Commits
  • Issue Boards
Collapse sidebar
  • bob
  • bob.buildoutbob.buildout
  • Issues
  • #24
Closed
Open
Created Feb 08, 2018 by Amir MOHAMMADI@amohammadiOwner

Cannot debug generated scripts using ipython in Python 3.6

I used to be able to run commands like bin/python `which ipython` --pdb -- bin/bob ... to debug my scripts. Now after I have switched to Python 3.6 this fails with the following error:

AttributeError                            Traceback (most recent call last)
/remote/idiap.svm/user.active/amohammadi/git/deep/bin/bob in <module>()
     64   ]
     65 if sys.version_info[:2] >= (3, 6): #see: http://bugs.python.org/issue30167
---> 66   _hack = str(sys.modules['__main__'].__loader__.__module__)
     67   sys.modules['__main__'].__loader__.__module__ += '_'
     68 import site #initializes site properly

AttributeError: 'NoneType' object has no attribute '__module__'
> /remote/idiap.svm/user.active/amohammadi/git/deep/bin/bob(66)<module>()
     64   ]
     65 if sys.version_info[:2] >= (3, 6): #see: http://bugs.python.org/issue30167
---> 66   _hack = str(sys.modules['__main__'].__loader__.__module__)
     67   sys.modules['__main__'].__loader__.__module__ += '_'
     68 import site #initializes site properly

However when I run just bin/bob ... it works.

Edited Feb 08, 2018 by Amir MOHAMMADI
Assignee
Assign to
Time tracking