philrosenfield / match

Python utilities for processing and plotting input and output from Andy Dolphin's MATCH
MIT License
4 stars 1 forks source link

loading scripts + config error #4

Closed dweisz closed 8 years ago

dweisz commented 8 years ago

I'm trying to import a module from the scripts folder, but am unable to do so:

In [1]: import match.scripts.asts

ImportError Traceback (most recent call last)

in () ----> 1 import match.scripts.asts /Users/dweisz/Documents/code/match/scripts/**init**.py in () 1 """ Everything that relates to MATCH """ ----> 2 from config import * 3 from . import graphics 4 from . import likelihood 5 from . import diagnostics something appears to be wrong with 'config'.
philrosenfield commented 8 years ago

I can't reproduce this.

Do you know why the file is called /Users/dweisz/Documents/code/match/scripts/init.py not /Users/dweisz/Documents/code/match/scripts/init.py?

After it is called init.py (that is, two "_" on each side of init) I'd try replacing config in line 2 with .config and seeing if that works.

philrosenfield commented 8 years ago

hold on ... git hub markdown took away the underscores...

philrosenfield commented 8 years ago

Still can't reproduce this. Can you confirm your <__init__.py> file only contains EXT='.png' ?

dweisz commented 8 years ago

Here's what I see:

(and yes it has the underscores on my terminal, as it should)

coltrane.local 9:23am > pwd /Users/dweisz/Documents/code/match/scripts coltrane.local 9:23am > less init.py """ Everything that relates to MATCH """ from config import from . import graphics from . import likelihood from . import diagnostics from .utils import

dweisz commented 8 years ago

here’s what I see:

coltrane.local 9:23am > pwd /Users/dweisz/Documents/code/match/scripts coltrane.local 9:23am > less init.py """ Everything that relates to MATCH """ from config import from . import graphics from . import likelihood from . import diagnostics from .utils import

On Nov 5, 2015, at 8:28 AM, Phil Rosenfield notifications@github.com wrote:

Still can't reproduce this. Can you confirm your <init.py> file only contains EXT='.png' ?

— Reply to this email directly or view it on GitHub https://github.com/dweisz/match/issues/4#issuecomment-154058930.

dweisz commented 8 years ago

issue understood. Incompatible with Python3. Raising new issue.