martin-saurer / jkernel

Jupyter Notebook / J Integration
GNU General Public License v3.0
44 stars 15 forks source link

Had to modify the jinter.py file to get this to work on Windows 10 under latest Anaconda #13

Closed tron666 closed 2 years ago

tron666 commented 4 years ago

Great code. I noticed that the kernel kept failing because of os.path.isabs() failing on types. I commented it out on my machine and got it to work successfully for me in the live version located:

C:\Users...\anaconda3\Lib\site-packages\jkernel

Here are the lines I commented out, and then it worked great:

    # Build J path names
    #if os.path.isabs(self.JBinFol):
    self.JBin = os.path.join(self.JBinFol)
    self.JLib = os.path.join(self.JBinFol,self.JDynLib)
    #if os.path.isabs(self.JProFil):
    #    self.JPro = self.JProFil
    #else:
    self.JPro = os.path.join(self.JBinFol,self.JProFil)
    #else:
    #    self.JBin = os.path.join(JInsFol,self.JBinFol)
    #    self.JLib = os.path.join(JInsFol,self.JBinFol,self.JDynLib)
    #    if os.path.isabs(self.JProFil):
    #        self.JPro = self.JProFil
    #    else:
    #        self.JPro = os.path.join(JInsFol,self.JBinFol,self.JProFil)
martin-saurer commented 4 years ago

Thanks! Please check the latest upload. I tested it with the latest Anaconda and an up-to-date Windows 10 version. It seems to work. Please confirm.

jcmorrow commented 3 years ago

Just wanted to chime in and say that I'm also seeing this error from these same lines on Mac OSX.

jcmorrow commented 3 years ago

Correction to my comment: I did get this error:

TypeError: expected str, bytes or os.PathLike object, not NoneType

but it was because I am using fish shell and I didn't properly export J_INSTALLATION_FOLDER and J_BIN_FOLDER. That's definitely my fault. That said, it might be worth catching this and raising a more instructive error message, rather than a common type error. Thanks for this project!

martin-saurer commented 2 years ago

Fixed in latest release.