In Atom editor, there is an import package that should allow user to import github repos into the Atom, here: https://atom.io/packages/import
I've tried it and it didn't work and gave me this error:
Uncaught TypeError: Cannot read property 'projectHome' of undefined
An issue was also raised but did anyone else have the same problem and know how to resolve this? My system is an Ubuntu 14.04.1
How to import Github repos into Atom editor?
I've tried to remove ~/.atom/config file but it doesn't exist:
alvas#ubi:~/.atom$ ls
compile-cache config.cson nohup.out packages storage
I've tried removing the config.cson and the same error. When i tried to grep for ProjectHome, i got:
alvas#ubi:~/.atom$ grep -nRHI projectHome *
compile-cache/coffee/5047aaae22a3f9ac99b5d85d388d780b7e76a729.js:96: workspace = atom.config.settings.core.projectHome;
compile-cache/coffee/5047aaae22a3f9ac99b5d85d388d780b7e76a729.js:97: defaultWorkspace = atom.config.defaultSettings.core.projectHome;
packages/import/lib/import-view.coffee:41: workspace = atom.config.settings.core.projectHome
packages/import/lib/import-view.coffee:42: defaultWorkspace = atom.config.defaultSettings.core.projectHome
You can try, to see if that make the issue go away, a similar solution like issue 3845:
Hm, the issue disappeared after I'd remove my ~/.atom/config.
I don't remember if I set something there with hands – guess some of local installed package did something :(
You can see a similar error at Atom.project.path (cannot call path of undefined in test), which points out that not every variable are set.
Related
Currently I am working a project that has have been using the pathlib library so I can work on my Windows desktop when I need too and on my MacBook Pro. Essentially be able to work between both operating systems. I have not have any issues at all until right now. Here is the set up:
I have a pipeline set up to automatically save a .joblib and a whole lot of .png files that will go to a directory called
output_dir = Path('../Trained_Models/Differential_gene_analysis/A Kidney Cancer Transcriptome Molecular Signature Identifies Tumors with Tumor Thrombus/Models train on TCGA data and test on Rodriguez data/Oct-XX-20XX')
For example, if I want to save a .joblib file under the name RandomForest_TumorThrombus_104.joblib,I would use the command
joblib.dump(model ,output_dir / 'RandomForest_TumorThrombus_104.joblib')
On my MacBook Pro, I have no issues when this is ran, but on Windows it gives me the following error
FileNotFoundError: [Errno 2] No such file or directory: '..\\Trained_Models\\Differential_gene_analysis\\A Kidney Cancer Transcriptome Molecular Signature Identifies Tumors with Tumor Thrombus\\Models train on TCGA data and test on Rodriguez data\\Oct-17-2022\\RandomForest_TumorThrombus_104.joblib'
I have tried to use the .resolve() method to get the absolute path but still gives me the same error. I have tried to experiment to try to see what is goin on such as using os.path.exists(). When using the os.path.exists() method I get True for the follwoing command:
os.path.exists(output_dir)
So it does indeed recognize that the directory exists. The next thing I tried was to rename the file to something like dddddd.joblib and that worked. But I find that only a few names for the file would allow me to save the files. During debug I found that the most recent Traceback occurs here:
with open(filename, 'wb') as f:```
I was wondering if anyone here had any idea what was going on here and how I can fix this issue? Please and Thank you.
The solution was to enable long paths on Windows.
So, I ran into a weird issue using an ipython notebook and not sure what to do. Normally, when I run a part of the code, if there is an error, I would trace it back, fix it, and then re-run the code. I was doing a similar thing but even after making changes to the code, it looks like nothing is changing!
Here is the example... I am using Python 3.5 so xrange is gone. This then caused an error to be thrown:
XXXX
24 XXXX
25 XXXX
---> 26 for t in xrange(0,len(data),1):
27
28 XXXX
NameError: name 'xrange' is not defined
but after changing my code (which you can see below the difference in line 26), the same error pops up!
XXXX
24 XXXX
25 XXXX
---> 26 for t in range(0,len(data),1):
27
28 XXX
NameError: name 'xrange' is not defined
Any ideas on why this would be happening?
As Thomas K said, you're probably making a change in an external file that was not imported. There is a very useful command in ipython notebook for such cases, called autoreaload. With autoreaload, whenever you modify an external file you do not have to import it again because the extension takes care of it for you. For more information check: ipython autoreload.
Whenever using external files along with Ipython use autoreload. It will reload the external files every time before executing any code in IPython.
Add this at first cell of the IPython.
%load_ext autoreload
%autoreload 2
For me this was due to one of the following:
Cause 1: imported module not updated
Solution:
import importlib
importlib.reload(your_module)
Cause 2: other
Solution: restart the kernel, for jupyter notebook this is how
I have the same problem. I tried jupyter magic autoreload but it didn't work. Finally, I solved it in this way:
in the first cell, add
import My_Functions as my
import importlib
importlib.reload(my)
But notice if the module is imported in this way:
from My_Functions import *
I couldn't reload it properly.
I have the same issue sometimes. I think it has to do with memory - if I have a bunch of dataframes hanging around it seems to cause issues. If I restart the kernel using the Kernel > Restart option the problem goes away.
I have the same problem sometimes. I restarted the kernels but it didn't work.I try to run the cell (ctr+ enter) two or three times. then the result will be displayed according to the updated codes. I hope it helps.
insert new empty cell with + option, go to Kernel, choose Restart & Run All.
Then, fill in the new inserted cell and run again in Kernel, choose Restart & Run All.
It works with me.
I am trying to run ReSharpers command line tool InspectCode.exe. It's running fine doing it's job with the expected output.
However after my earlier attempt to get plugins to work, this time with the new version it is supposed to be supported. There is a switch in the command line interface that allows to specify the extension you want to use.
/extensions (/x) – allows using ReSharper extensions that affect code analysis. To use an extension, specify its ID, which you can find by opening the extension package page in the ReSharper Gallery, and then the Package Statistics page. Multiple values are separated with the semicolon.
But I cannot get it to work properly. I cannot even provoke any reaction to the /x switch at all. No matter how or what I pass, I get no feedback from the executable and the output is identical. I don't even get an error message when passing obvious garbage.
I tried the following commandlines for the exact same result:
inspectcode.exe /o="rcli.xml" /swea /x="ReSharper.StyleCop" "my.sln"
inspectcode.exe /o="rcli.xml" /swea /x=ReSharper.StyleCop "my.sln"
inspectcode.exe /o="rcli.xml" /swea "my.sln"
inspectcode.exe /o="rcli.xml" /swea /x=ABCDEFG "my.sln"
Result
JetBrains Inspect Code 9.1.1
Running in 64-bit mode, .NET runtime 4.0.30319.18444 under Microsoft Windows NT
6.1.7601 Service Pack 1
Enabled solution-wide analysis according to Inspect Code command line Setting.
Analyzing files
[files]
Inspection report was written to rcli.xml
What am I doing wrong? How to get extensions to work?
I already tried the R# forums, but it took them more then 24h to approve my post and so far I'm not sure someone else even read it.
Unfortunately, the support for extensions was dropped in 9.0 due to the refactorings in the "ReSharper platform". I hope that JetBrains will bring it back soon.
See RSRP-436208.
This is a late answer that might help future readers (like myself). Currently inspectcode.exe will automatically look for and use any NuGet packages that are in the same folder as the executable (source).
Example for CleanCode extension:
if you have a R# instance on some machine and install the extension, it will be placed in C:\Users\{user}\AppData\Local\JetBrains\plugins\MO.CleanCode.5.6.15
copy MO.CleanCode.5.6.15.nupkg and paste it next to inspectcode.exe
when running inspectcode with verbosity = VERBOSE, the extension should appear in the Zones list:
$cmd = "..\JetBrains.ReSharper.CommandLineTools.2019.3.4\inspectcode.exe"
$outputFile = "..\Output\$($outputName).xml"
& $cmd -o="$outputFile" $sln --verbosity=VERBOSE
Zones: (52pcs)[CodeInspectionPageImplZone, DaemonEngineZone,
DaemonZone, IAmd64CpuArchitectureHostZone, IAspMvcZone,
IBatchToolEnvironmentZone, IClrImplementationHost Zone,
IClrPsiLanguageZone, ICodeEditingOptionsPageImplZone,
IConsoleEnvironmentZone, ICppProductZone, ICpuArchitectureHostZone,
IDocumentModelZone, IEnvironmentZone, IHostSolutionZone,
IInspectCodeConsoleEnvironmentZone, IInspectCodeEnvironmentZone,
IInspectCodeZone, ILanguageAspZone, ILanguageBuildScriptsZone,
ILanguageCppZone, I LanguageCSharpZone, ILanguageCssZone,
ILanguageHtmlZone, ILanguageIlZone, ILanguageJavaScriptZone,
ILanguageMsBuildZone, ILanguageNAntZone, ILanguageProtobufZone, ILa
nguageRazorZone, ILanguageRegExpZone, ILanguageResxZone,
ILanguageVBZone, ILanguageXamlZone, INetFrameworkHostZone, INuGetZone,
IOperatingSystemHostZone, IProjectMode lZone,
IPsiAssemblyFileLoaderImplZone, IPsiLanguageZone,
IPublicVisibilityZone, IRdFrameworkZone, IRiderModelZone,
ISinceClr2HostZone, ISinceClr4HostZone, ITextContro lsZone,
IToolsOptionsPageImplZone, IWebPsiLanguageZone, IWindowsNtHostZone,
PsiFeaturesImplZone, ReplaceableByIntelliJPlatformZone, SweaZone]
Packages: (23pcs)[JetBrains.ExternalAnnotations,
JetBrains.Platform.Core.Ide, JetBrains.Platform.Core.IisExpress,
JetBrains.Platform.Core.MsBuild, JetBrains.Platform. Core.Shell,
JetBrains.Platform.Core.Text, JetBrains.Platform.Interop.CommandLine,
JetBrains.Platform.Interop.dotMemoryUnit.Framework,
JetBrains.Platform.Interop.dotMe moryUnit.Interop.Console,
JetBrains.Platform.Interop.dotMemoryUnit.Interop.Ide,
JetBrains.Platform.RdProtocol, JetBrains.Psi.Features.Core,
JetBrains.Psi.Features.Cpp .Src.Core, JetBrains.Psi.Features.src,
JetBrains.Psi.Features.Tasks, JetBrains.Psi.Features.UnitTesting,
JetBrains.Psi.Features.Web.Core, JetBrains.ReSharperAutomatio
nTools.src.CleanupCode,
JetBrains.ReSharperAutomationTools.src.CommandLineCore,
JetBrains.ReSharperAutomationTools.src.CommandLineProducts,
JetBrains.ReSharperAutomat ionTools.src.DuplicatesFinder,
JetBrains.ReSharperAutomationTools.src.InspectCode, MO.CleanCode]
I use Github pages to host my websites,I have test it on my local machine, and it works well, but when I push my sites on Github, I got an error. It says
The page build failed with the following error:
unable to run jekyll
My _config.yml file
---
auto : false
lsi : false
pygments : true
permalink : none
markdown : maruku
maruku:
use_divs: true
use_tex: true
png_engine : blahtex
png_dir : images/latex/
png_url : /images/latex/
I have searched the web, but can't find any useful ideas. Who can help me?
I have resorted to Github, they sent me the log, here is the error:
Maruku: Using extended syntax for div elements.\nMaruku: Using LaTeX extension. Images in images/latex/.\n/var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/ext/math/mathml_engines/blahtex.rb:40:in convert_to_png_blahtex': Blahtex error: empty output (RuntimeError)\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/ext/math/to_html.rb:64:in send'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/ext/math/to_html.rb:64:in render_png'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/ext/math/to_html.rb:120:in to_html_equation'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:970:in send'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:970:in array_to_html'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:961:in each'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:961:in array_to_html'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:956:in children_to_html'\n\tfrom /var/lib/gems/1.8/gems/maruku-0.6.0/lib/maruku/output/to_html.rb:50:in to_html'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/converters/markdown.rb:120:in convert'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/convertible.rb:46:in transform'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/convertible.rb:84:in do_layout'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/post.rb:189:in render'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/site.rb:193:in render'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/site.rb:192:in each'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/site.rb:192:in render'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/../lib/jekyll/site.rb:40:in process'\n\tfrom /var/lib/gems/1.8/gems/jekyll-0.11.0/bin/jekyll:250\n\tfrom /var/lib/gems/1.8/bin/jekyll:19:in `load'\n\tfrom /var/lib/gems/1.8/bin/jekyll:19\n"
From the log, We can see the problem is `convert_to_png_blahtex': Blahtex error: empty output (RuntimeError). I read the blahtex code,
if png.name != 'png'
maruku_error "Blahtex error: \n#{doc}"
return nil
end
But, png files are there. Anyone has encountered this problem?
I'm not sure the _config.yml file is the problem. I've pushed an invalid one to my site and the pages still render fine. That said, try removing your _config.yml all together. Github pages work fine without it for me. If the page still fails to render, you know it's something else.
Don't use maruku
maruku hasnt had an update since June 2010.
Personally I prefer kramdown.
everytime i try to install the wurfl2 extension in TYPO3 i get the following error message:
Fatal error: require_once() [function.require]: Failed opening required '' (include_path='.:/usr/local/php/lib/php:/usr/local/php/lib/php/PEAR') in /html/typo3conf/temp_CACHED_ps9b8e_ext_localconf.php on line 501
is anyone familiar with this error and knows how to fix it?
I get the same error message with TYPO3 4.4.4. I had to remove the extension folder and to delete all ./typo3conf/temp* files to get Typo3 running again afterwards.
(You might not see the error message if you don't have something like $TYPO3_CONF_VARS['SYS']['displayErrors'] = '1' in your localconf.php. You can set this with the installtool.
As already mentioned by the other answer first you have to get your system running again: set $TYPO3_CONF_VARS['SYS']['displayErrors'] = '1' in your localconf.php in order to see all error messages. Afterwards remove the extension folder.
I think the error is caused by a missing config file. The extension constant wurflConfig has to be set with the absolute path to the file /YOUR/PATH/TO/WEB_DIR/typo3conf/ext/wurfl2/res1/li/wurfl_config.php and might have to adjust the settings there.