Closed mrjeffs closed 8 years ago
Any changes in your environment? The error suggests a version conflict.
Oh you are in the pylabs directory which has an io
package which is the conflict:
Try cd ..
If that doesn't help we can rename the pylabs.io
package
None that I can tell. Just nibabel. As far as I know. How would I tell which is the offending package? J
From: "Jasper J.F. van den Bosch" Reply-To: ilogue/niprov Date: Friday, April 15, 2016 at 6:36 PM To: ilogue/niprov Cc: Jeff Stevenson Subject: Re: [ilogue/niprov] import niprov fails in script but works in ipython (#133)
Any changes in your environment? The error suggests a version conflict.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://github.com/ilogue/niprov/issues/133#issuecomment-210706031
Well then. I was simply following where you put your script. Why did you put it there instead of in qt1? Just curious… j
From: "Jasper J.F. van den Bosch" Reply-To: ilogue/niprov Date: Friday, April 15, 2016 at 6:38 PM To: ilogue/niprov Cc: Jeff Stevenson Subject: Re: [ilogue/niprov] import niprov fails in script but works in ipython (#133)
Try cd ..
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://github.com/ilogue/niprov/issues/133#issuecomment-210706900
Also, try not to use relative imports (from . import utils
)
You can still put it in the qt1 location but run the code with your working directory elsewhere.
import pylabs.utils as utils
should fix it too.
How about just moving the script into the qt1 dir? J
From: "Jasper J.F. van den Bosch" Reply-To: ilogue/niprov Date: Friday, April 15, 2016 at 6:39 PM To: ilogue/niprov Cc: Jeff Stevenson Subject: Re: [ilogue/niprov] import niprov fails in script but works in ipython (#133)
If that doesn't help we can rename the pylabs.io package
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://github.com/ilogue/niprov/issues/133#issuecomment-210707446
Right, usually I run everything from ~/Software/pylabs. As in Python pylabs/qt1/pipeline.py
From: "Jasper J.F. van den Bosch" Reply-To: ilogue/niprov Date: Friday, April 15, 2016 at 6:41 PM To: ilogue/niprov Cc: Jeff Stevenson Subject: Re: [ilogue/niprov] import niprov fails in script but works in ipython (#133)
You can still put it in the qt1 location but run the code with your working directory elsewhere.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://github.com/ilogue/niprov/issues/133#issuecomment-210708882
Ok will try that 1st. J
From: "Jasper J.F. van den Bosch" Reply-To: ilogue/niprov Date: Friday, April 15, 2016 at 6:41 PM To: ilogue/niprov Cc: Jeff Stevenson Subject: Re: [ilogue/niprov] import niprov fails in script but works in ipython (#133)
import pylabs.utils as utils should fix it too.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://github.com/ilogue/niprov/issues/133#issuecomment-210709161
I don’t usually. :-) j
From: "Jasper J.F. van den Bosch" Reply-To: ilogue/niprov Date: Friday, April 15, 2016 at 6:40 PM To: ilogue/niprov Cc: Jeff Stevenson Subject: Re: [ilogue/niprov] import niprov fails in script but works in ipython (#133)
Also, try not to use relative imports (from . import utils)
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://github.com/ilogue/niprov/issues/133#issuecomment-210708267
Nope not working. Seems the init in pylabs is in conflict no? J
From: "Jasper J.F. van den Bosch" Reply-To: ilogue/niprov Date: Friday, April 15, 2016 at 6:41 PM To: ilogue/niprov Cc: Jeff Stevenson Subject: Re: [ilogue/niprov] import niprov fails in script but works in ipython (#133)
import pylabs.utils as utils should fix it too.
— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHubhttps://github.com/ilogue/niprov/issues/133#issuecomment-210709161
I'm closing this as it's a pylabs issue
weird: Traceback (most recent call last): File "pylabs/tadpole_qt1_comparison.py", line 3, in
from pylabs.utils.paths import getlocaldataroot
File "/home/toddr/Software/pylabs/pylabs/init.py", line 5, in
from . import utils
File "/home/toddr/Software/pylabs/pylabs/utils/init.py", line 7, in
from ._options import PylabsOptions # noqa
File "/home/toddr/Software/pylabs/pylabs/utils/_options.py", line 1, in
import niprov
File "/home/toddr/Software/niprov/niprov/init.py", line 11, in
from niprov.webapp import serve
File "/home/toddr/Software/niprov/niprov/webapp.py", line 1, in
from pyramid.config import Configurator
File "/home/toddr/Software/anaconda2/lib/python2.7/site-packages/pyramid/config/init.py", line 10, in
from webob.exc import WSGIHTTPException as WebobWSGIHTTPException
File "/home/toddr/Software/anaconda2/lib/python2.7/site-packages/webob/init.py", line 2, in
from webob.request import *
File "/home/toddr/Software/anaconda2/lib/python2.7/site-packages/webob/request.py", line 1500, in
class LimitedLengthFile(io.RawIOBase):
AttributeError: 'module' object has no attribute 'RawIOBase'