Opened 8 years ago
Last modified 7 years ago
#949 new defect
Wildcard import
Reported by: | andyfaff | Owned by: | |
---|---|---|---|
Priority: | minor | Milestone: | SasView 5.0.0 |
Component: | SasView | Keywords: | |
Cc: | Work Package: | SasView Bug Fixing |
Description (last modified by butler)
While trying to fix wildcard imports I come across a few problems.
You can reproduce it by changing src/sas/sasgui/guiframe/local_perspectives/plotting/init.py to:
from .plotting import Plugin
However when you do this you see the following. I think it's due to a circular import. For whatever reason it doesn't appear with wildcard imports.
(sasview) p0006m:sasview anz$ pythonw run.py
13:55:21 - INFO : sas.sasview.sasview: 26: —- SasView session started —-
13:55:21 - INFO : sas.sasview.sasview: 28: Python: 2.7.13 |Continuum Analytics, Inc.| (default, Dec 20 2016, 23:05:08)
[GCC 4.2.1 Compatible Apple LLVM 6.0 (clang-600.0.57)]
13:55:21 - INFO : sas.sasview.sasview: 46: You have not set the SASVIEW_WX_VERSION environment variable, so using default version of wxPython.
13:55:22 - INFO : sas.sasview.sasview: 51: Wx version: 3.0.0.0
Traceback (most recent call last):
File "run.py", line 158, in <module>
from sas.sasview.sasview import run
File "/Users/anz/Documents/Andy/programming/sasview/sasview/sasview.py", line 71, in <module>
from sas.sasgui.guiframe import gui_manager
File "/Users/anz/Documents/Andy/programming/sasview/src/sas/sasgui/guiframe/gui_manager.py", line 40, in <module>
from sas.sasgui.guiframe.data_panel import DataPanel
File "/Users/anz/Documents/Andy/programming/sasview/src/sas/sasgui/guiframe/data_panel.py", line 31, in <module>
from sas.sasgui.guiframe.local_perspectives.plotting.SimplePlot \
File "/Users/anz/Documents/Andy/programming/sasview/src/sas/sasgui/guiframe/local_perspectives/plotting/init.py", line 2, in <module>
from .plotting import Plugin
File "/Users/anz/Documents/Andy/programming/sasview/src/sas/sasgui/guiframe/local_perspectives/plotting/plotting.py", line 23, in <module>
from sas.sasgui.guiframe.gui_manager import MDIFrame
ImportError?: cannot import name MDIFrame
Change History (1)
comment:1 Changed 7 years ago by butler
- Description modified (diff)
- Milestone changed from SasView 4.2.0 to SasView 5.0.0