I was working on something an I this is actually my first time so things are not that clear for me yet, I ran this code :
pip install nipype
from nipype import Node, Workflow
from nipype.interfaces.fsl import SliceTimer, MCFLIRT, Smooth
slicetimer = Node(SliceTimer(index_dir=False,
interleaved=True,
time_repetition=2.5),
name="slicetimer")
mcflirt = Node(MCFLIRT(mean_vol=True,
save_plots=True),
name="mcflirt")
smooth = Node(Smooth(fwhm=4), name="smooth")
preproc01 = Workflow(name='preproc01', base_dir="dir_path")
preproc01.connect([(slicetimer, mcflirt, [('slice_time_corrected_file', 'in_file')]),
(mcflirt, smooth, [('out_file', 'in_file')])])
slicetimer.inputs.in_file = "file_path"
preproc01.run('MultiProc')
This is the error shown when I run the last line of code :
"Could not import plugin module: nipype.pipeline.plugins"
There is one more problem :
When I try to run this code :
preproc01.write_graph(graph2use='orig')
This is the error message shown :
'No command "dot" found on host. Please check that the corresponding package is installed.'
please if anyone knows the solution help me out.
BTW I an doing this from a video series, here is the link :https://www.youtube.com/watch?v=4FVGn8vodkc&t=4414s
Nipype showcase section.
Related
import gudhi as gd
f= 'E:/PHD/persistance/image.txt'
# compute PH
md_cubical_complex = gd.CubicalComplex(perseus_file=f)
# result
md_cc_diag=md_cubical_complex.persistence()
pd_array=pdarray(md_cc_diag)
# filename
# write txt file
fout= 'E:/PHD/output' + filename + "_pd.txt"
np.savetxt(fout,pd_array,fmt='%1.6f')
whenever I try to run this code the following error occurs "The kernel appears to have died. It will restart automatically." i have tried many solutions mentioned on StackOverflow GitHub and Keras. Reinstalling libraries, creating new environments, changing the version of the library. kindly suggest a solution.
the code is not calculating cubical complexes and persistent homology.
I am a Python newbie currently looking into Crash Course Ai #5 How to Make an AI read your handwriting (LAB).
Running Step 1.2 gives me *NameError: name 'extract_training_samples' is not defined.
Tried so far: 1) updated pip version to 20.0.2 and installed emnist python package
2) tried an additional line of code: from emnist import extract_training_samples but got a ModuleNotFound error.
Feedback appreciated!
OK, very simple solution!
You just forgot the "s".
I find myself running into that problem all the time when coding. Whenever I run into a Name Error, the first thing I do is check my spelling!
your code:
x, y = extract_training_sample('letters')
the code on the website:
extract_training_samples('letters')
Cheers,
I'm currently working on a script that creates a tray icon that allows the user to adjust screen brightness through menu options. The source code, written in python 3.6.8, can be found as a paste HERE. There seems to be an error message coming up when trying to select one of the brightness options, seen HERE. I did some reading and found that the error I'm getting (0x8004100c) refers to a feature or operation not being supported. Are there any workarounds available for this?
Thank you in advance.
code: https://pastebin.com/sLbyE9yb
error: https://pastebin.com/Xs7wHk73
WMI error reference: https://learn.microsoft.com/en-us/windows/win32/wmisdk/wmi-error-constants
gist: https://gist.github.com/imri0t/12e768e3d7e08734b85ae532d56090e1
(also if anyone can let me know if there's a way to keep the script from dying after an action is made it would be appreciated)
modules needed: pip install infi.systray / pip install wmi
code snip that I believe produces the error:
from infi.systray import SysTrayIcon
import wmi
def brightness_50(systray):
'''brightness: 50%'''
b = 50
c = wmi.WMI(namespace='root\\wmi')
br = c.WmiMonitorBrightnessMethods()[0]
br.WmiSetBrightness(3, b) #b will be a precentage / 100
menu = (("brightness: 100%", None, brightness_50))
systray = SysTrayIcon("icon.ico", "brightness", menu)
systray.start()
I'm having a problem running the following chunk of code in Jupyter Notebook:
i=[0,1,2,3]
from eppy.runner import run_functions
for i in i:
OA.Economizer_Control_Type = ECT[i]
idf1.saveas('C:/Users/mdahdolan/Dropbox/Work and Studies/Economizer
Study/Python/1A_Small_Office.idf')
print(OA.Economizer_Control_Type)
idf1.run(verbose='v')
and I'm getting this error:
om/bEI6B.jpg
You have issues with the path in the function saveas(), check that the route is available, exists and you can reach it without privileges ;)
I get msms.exe has stopped working with this simple script, please help me debug it. I tried it with a different pdb, same result. You might want to take a look at ResidueDepth.py.
AssertionError: Failed to generate surface file using command:
msms -probe_radius 1.5 -if C:\Users\Ahmad\AppData\Local\Temp\tmp2pa74le2 -of C:\Users\Ahmad\AppData\Local\Temp\tmpf7zqwkg6 > C:\Users\Ahmad\AppData\Local\Temp\tmpncvn65g4
from Bio.PDB import PDBParser, ResidueDepth
p = PDBParser()
s = p.get_structure("X", '1crn.pdb')
model = s[0]
rd = ResidueDepth(model, '1crn.pdb')
print(rd[(chain_id, res_id)])
The ResidueDepth code depends on pdb_to_xyzr, which is a BASH script that cannot run on windows. An issue was created regarding this problem here.