FHIR publisher fails on a java NullPointerException - hl7-fhir

I am trying to build our IG for the first time using the publishler.jar but am getting a NullPointerException. I understand that there is some problem with it not managing to find some code in a CodeSystem but I can't figure it out.
One clear problem that you'll see when I paste the output is that, for some reason it is working with r5 but we need r4 (4.0.1) and I have a hunch that this is leading to the problem because in r5 we do seem to have some issue with CodeSystems we still haven't figured out. Maybe someone can figure out what I'm doing wrong.
I actually tried 2 different approaches. the first:
java -jar publisher.jar -ig "c:\FHIR\outburn\fsh-generated\resources\ImplementationGuide-outburn.json"
output:
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
FHIR IG Publisher Version 1.1.104 (Git# 036db5f8f83b). Built 2022-02-16T06:43:23.823Z (13 hours old)
Detected Java version: 1.8.0_275 from C:\Program Files\AdoptOpenJDK\jdk-8.0.275.1-hotspot\jre on Windows 10/amd64 (64bit). 1796MB available
dir = C:\FHIR\outburn\input-cache, path = C:\Python39\Scripts\;C:\Python39\;C:\Program Files\AdoptOpenJDK\jdk-8.0.275.1-hotspot\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Calibre2\;C:\hapi-fhir-cli;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Ruby27-x64\bin;C:\Users\amosr\AppData\Local\Programs\Python\Python38-32\Scripts\;C:\Users\amosr\AppData\Local\Programs\Python\Python38-32\;C:\Users\amosr\AppData\Local\Microsoft\WindowsApps;;C:\Program Files\JetBrains\PyCharm 2019.3.4\bin;;C:\Users\amosr\AppData\Roaming\npm
Parameters: -ig c:\FHIR\outburn\fsh-generated\resources\ImplementationGuide-outburn.json
Start Clock # Wednesday, February 16, 2022 9:53:20 PM IST (2022-02-16T21:53:20+02:00)
API keys loaded from C:\Users\amosr\fhir-api-keys.ini (00:00.0010)
Package Cache: C:\Users\amosr\.fhir\packages (00:00.0014)
Load Configuration from c:\FHIR\outburn\fsh-generated\resources\ImplementationGuide-outburn.json (00:00.0030)
Root directory: C:\FHIR\outburn\fsh-generated\resources (00:00.0060)
Publishing Content Failed: null (00:00.0064)
(00:00.0065)
Use -? to get command line help (00:00.0070)
(00:00.0072)
Stack Dump (for debugging): (00:00.0073)
java.lang.NullPointerException
at org.hl7.fhir.igtools.publisher.Publisher.initializeFromJson(Publisher.java:2920)
at org.hl7.fhir.igtools.publisher.Publisher.initialize(Publisher.java:2162)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:850)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:10005)
the second attempt was to use the _geounce.bat (which looks like this(link))
when run correctly it starts off with running SUSHI, which takes FHIR Shorthand files and turns them to JSON. That part's fine so I am removing that part of the output:
C:\FHIR\outburn>_genonce.bat -ig "c:\FHIR\outburn\fsh-generated\resources\ImplementationGuide-outburn.json"
Checking internet connection...
Reply from 104.196.166.17: bytes=32 time=161ms TTL=115
We're online
Picked up JAVA_TOOL_OPTIONS: -Dfile.encoding=UTF-8
FHIR IG Publisher Version 1.1.104 (Git# 036db5f8f83b). Built 2022-02-16T06:43:23.823Z (12 hours old)
Detected Java version: 1.8.0_275 from C:\Program Files\AdoptOpenJDK\jdk-8.0.275.1-hotspot\jre on Windows 10/amd64 (64bit). 1796MB available
dir = C:\FHIR\outburn, path = C:\Python39\Scripts\;C:\Python39\;C:\Program Files\AdoptOpenJDK\jdk-8.0.275.1-hotspot\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\Windows\system32;C:\Windows;C:\Windows\System32\Wbem;C:\Windows\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\NVIDIA Corporation\PhysX\Common;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\QuickTime\QTSystem\;C:\Program Files\Microsoft VS Code\bin;C:\Program Files\Calibre2\;C:\hapi-fhir-cli;C:\Program Files\nodejs\;C:\ProgramData\chocolatey\bin;C:\Ruby27-x64\bin;C:\Users\amosr\AppData\Local\Programs\Python\Python38-32\Scripts\;C:\Users\amosr\AppData\Local\Programs\Python\Python38-32\;C:\Users\amosr\AppData\Local\Microsoft\WindowsApps;;C:\Program Files\JetBrains\PyCharm 2019.3.4\bin;;C:\Users\amosr\AppData\Roaming\npm
Parameters: -ig . -ig c:\FHIR\outburn\fsh-generated\resources\ImplementationGuide-outburn.json
Start Clock # Wednesday, February 16, 2022 8:46:45 PM IST (2022-02-16T20:46:45+02:00)
API keys loaded from C:\Users\amosr\fhir-api-keys.ini (00:00.0009)
Package Cache: C:\Users\amosr\.fhir\packages (00:00.0014)
Run Sushi on C:\FHIR\outburn (00:00.0016)
--this was SUSHI output --
Load Template from hl7.base.template (00:30.0410)
2022-02-16 20:47:24.317 [main] INFO o.h.f.u.n.FilesystemPackageCacheManager [FilesystemPackageCacheManager.java:232] Failed to determine latest version of package hl7.base.template from server: http://packages.fhir.org
Load Template from fhir.base.template#0.2.2 (00:40.0309)
onLoad.findSpreadsheets:
onLoad.updateIg:
[xslt] Processing C:\FHIR\outburn\template\onLoad-ig-working.xml to C:\FHIR\outburn\template\onLoad-ig-updated.xml
[xslt] Loading stylesheet C:\FHIR\outburn\template\scripts\onLoad.xslt
onLoad.extend:
onLoad:
Root directory: C:\FHIR\outburn (00:45.0121)
Core Package hl7.fhir.r4.core#4.0.1
Terminology Cache is at C:\FHIR\outburn\input-cache\txcache. 1 files in cache (00:50.0633)
Connect to Terminology Server at http://tx.fhir.org (00:50.0637)
Load Package hl7.fhir.pubpack#0.0.9
Load Package hl7.fhir.xver-extensions#0.0.8
Load Package hl7.terminology.r4#3.0.0
Initialization complete (00:56.0996)
Fetch http://fhir.outburn.co.il/package-list.json for version check (00:56.0999)
Load Content (00:58.0044)
loadPrePages from FetchedFile[C:\FHIR\outburn\fsh-generated\includes] as C:\FHIR\outburn\fsh-generated\includes
Processing Conformance Resources (00:59.0527)
Generating Snapshots (01:00.0197)
Making device-mappings.html#udi relative to 'http://hl7.org/fhir/R4/'
Making event.html relative to 'http://hl7.org/fhir/R4/'
Making servicerequest-example-di.html relative to 'http://hl7.org/fhir/R4/'
Making servicerequest-example-di.html relative to 'http://hl7.org/fhir/R4/'
Generating Narratives (01:01.0699)
Publishing Content Failed: null (01:02.0700)
(01:02.0701)
Use -? to get command line help (01:02.0704)
(01:02.0709)
Stack Dump (for debugging): (01:02.0710)
java.lang.NullPointerException
at org.hl7.fhir.r5.terminologies.CodeSystemUtilities.hasCode(CodeSystemUtilities.java:441)
at org.hl7.fhir.r5.terminologies.CodeSystemUtilities.hasCode(CodeSystemUtilities.java:433)
at org.hl7.fhir.r5.renderers.CodeSystemRenderer.showPropertyInTable(CodeSystemRenderer.java:248)
at org.hl7.fhir.r5.renderers.CodeSystemRenderer.generateCodeSystemContent(CodeSystemRenderer.java:153)
at org.hl7.fhir.r5.renderers.CodeSystemRenderer.render(CodeSystemRenderer.java:60)
at org.hl7.fhir.r5.renderers.CodeSystemRenderer.render(CodeSystemRenderer.java:43)
at org.hl7.fhir.r5.renderers.ResourceRenderer.render(ResourceRenderer.java:77)
at org.hl7.fhir.igtools.publisher.Publisher.generateNarratives(Publisher.java:1806)
at org.hl7.fhir.igtools.publisher.Publisher.loadConformance(Publisher.java:4671)
at org.hl7.fhir.igtools.publisher.Publisher.createIg(Publisher.java:1005)
at org.hl7.fhir.igtools.publisher.Publisher.execute(Publisher.java:856)
at org.hl7.fhir.igtools.publisher.Publisher.main(Publisher.java:10005)
Press any key to continue . . .
I really hope someone can help me because I am starting to lose it :) Hope the post wasn't too long. If it is, let me know and I'll take the outputs out to a snippet site.

that’s a bug in the IG publisher for sure. Will be fixed next release. but the cause is because you have a URL for the property that is simply a URL. That might be valid and what you want, or not.
Explanation:
The property definition has a uri that formally identifies the property. The IGPublisher was expecting that to be in the format {code-system-uri}#{code} but that format isn't required.

Related

How do you debug using 'Code::Blocks 20.03' (the "mingw" version)?

I have built a Console Application using Code::Blocks 20.03, which was installed using codeblocks-20.03mingw-setup.exe. The defaults for the installation directory(see Note01) and the installation type (Full), were used.
I tried to Debug by using the Debug menu, clicking Start/Continue, and debugging failed.
I guess the important information from the log of what happened is
Starting the debuggee failed: No executable specified, use `target exec'
The full output from trying to debug is given below.
My question is, how do you debug using Code::Blocks 20.03 (the "mingw" version)?
Full Output from trying to run a debugging session follows.
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\CodeBlocks20.03Small\ConsoleApplication\program01INc\
Adding source dir: C:\CodeBlocks20.03Small\ConsoleApplication\program01INc\
Adding file: C:\CodeBlocks20.03Small\ConsoleApplication\program01INc\bin\Debug\program01INc.exe
Changing directory to: C:/CodeBlocks20.03Small/ConsoleApplication/program01INc/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Program Files\Microsoft MPI\Bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Skype\Phone;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd;C:\Users\Roger\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;c:\Program Files\Microsoft SQL Server\110\DTS\Binn;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\FreeFem++;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Roger\AppData\Local\Programs\Python\Python38-32\Scripts;C:\Users\Roger\AppData\Local\Programs\Python\Python38-32;C:\Users\Roger\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64;C:\texlive\2017\bin\win32;C:\Users\Roger\AppData\Local\Microsoft\WindowsApps;\;C:\Program Files (x86)\clisp-2.49
Starting debuggee: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/CodeBlocks20.03Small/ConsoleApplication/program01INc/bin/Debug/program01INc.exe
done
Setting breakpoints
Debugger name and version: GNU gdb (GDB) 7.6.1
Starting the debuggee failed: No executable specified, use `target exec'.
Debugger finished with status 0
===============================
In building my project I used the defaults from the Select Compiler dialog box.
Note01:
It looks as if you should (date 11th April 2021) always use the default directory, to install. I installed a version of Code::Blocks in C:\Program Files\CodeBlocksSmall when I went to uninstall it, the uninstaller would only accept C:\Program Files\CodeBlocks as the directory to uninstall from. I deleted the CodeBlocksSmall directory manually. I noticed this behaviour when I installed using codeblocks-20.03-setup.exe.
Related question
Starting the debuggee failed: No executable specified, use `target exec'
=======================
It looks as if a prior installation of MinGW was inadvertently being used by the attempted debugging session(this is no longer possible). See the involvement of the file
C:\MinGW\bin\gdb.exe, in the line
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args
Now when I try to run a debugging session, failure occurs differently (see just after the next four lines).
It looks to me as if I need to at least to change the behaviour indicated by
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args
to behaviour produced by
Starting debugger: C:\Program Files\CodeBlocks\MinGW\bin\gdb.exe -nx -fullname -quiet -args
Active debugger config: GDB/CDB debugger:Default
Building to ensure sources are up-to-date
Selecting target:
Debug
Adding source dir: C:\Codeblocks20.03\ConsoleApp\program01INcForAnswer\
Adding source dir: C:\Codeblocks20.03\ConsoleApp\program01INcForAnswer\
Adding file: C:\Codeblocks20.03\ConsoleApp\program01INcForAnswer\bin\Debug\program01INcForAnswer.exe
Changing directory to: C:/Codeblocks20.03/ConsoleApp/program01INcForAnswer/.
Set variable: PATH=.;C:\Program Files\CodeBlocks\MinGW\bin;C:\Program Files\CodeBlocks\MinGW;C:\Program Files\Microsoft MPI\Bin;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\ProgramData\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client;C:\Program Files\Intel\iCLS Client;C:\Windows\System32;C:\Windows;C:\Windows\System32\wbem;C:\Windows\System32\WindowsPowerShell\v1.0;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Microsoft\Web Platform Installer;C:\Program Files\Microsoft SQL Server\110\Tools\Binn;C:\Program Files (x86)\Skype\Phone;C:\Program Files (x86)\Git\bin;C:\Program Files (x86)\Git\cmd;C:\Users\Roger\.dnx\bin;C:\Program Files\Microsoft DNX\Dnvm;C:\Program Files\Microsoft SQL Server\130\Tools\Binn;C:\Program Files (x86)\GtkSharp\2.12\bin;C:\Program Files (x86)\Microsoft ASP.NET\ASP.NET Web Pages\v1.0;c:\Program Files (x86)\Microsoft SQL Server\110\Tools\Binn;c:\Program Files\Microsoft SQL Server\110\DTS\Binn;C:\Program Files\Intel\WiFi\bin;C:\Program Files\Common Files\Intel\WirelessCommon;C:\Windows\System32\OpenSSH;C:\Program Files (x86)\FreeFem++;C:\Program Files\dotnet;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn;C:\Program Files (x86)\Microsoft VS Code\bin;C:\Users\Roger\AppData\Local\Programs\Python\Python38-32\Scripts;C:\Users\Roger\AppData\Local\Programs\Python\Python38-32;C:\Users\Roger\AppData\Local\Programs\MiKTeX 2.9\miktex\bin\x64;C:\texlive\2017\bin\win32;C:\Users\Roger\AppData\Local\Microsoft\WindowsApps;C:\Program Files (x86)\clisp-2.49
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/Codeblocks20.03/ConsoleApp/program01INcForAnswer/bin/Debug/program01INcForAnswer.exe
failed
Another related question is at
code blocks failed message runing hello code
There, the error message is like the one shown just above, and see also below
Starting debugger: C:\MinGW\bin\gdb.exe -nx -fullname -quiet -args C:/Codeblocks20.03/ConsoleApp/program01INcForAnswer/bin/Debug/program01INcForAnswer.exe failed
Note that, in both cases, Code::Blocks is trying to invoke a debugger from the directory C:\MinGW\bin
To get debugging working, the type of fix described here wil be required if you install the MinGW version of Code::Blocks 20.03 on Windows, using codeblocks-20.03mingw-setup.exe ( the 8th April 2021 version, with the default installation accepted ).
What I did to get it to work was the following.
From the Settings menu I clicked on Debugger.., then on the left of the screen selected Default, a debugger type. This showed me Executable paths which was set to
C:\MinGW\bin\gdb.exe
I changed this to
C:\Program Files\Codeblocks\MinGW\bin\gdb.exe
I was then able to use the debugger.

Error When Activating Conda Environment Windows 10

I just installed Anaconda3 and when I open the Anaconda command prompt, it shows me this error:
# >>>>>>>>>>>>>>>>>>>>>> ERROR REPORT <<<<<<<<<<<<<<<<<<<<<<
Traceback (most recent call last):
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\cli\main.py", line 138, in main
return activator_main()
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\activate.py", line 996, in main
print(activator.execute(), end='')
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\activate.py", line 180, in execute
return getattr(self, self.command)()
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\activate.py", line 154, in activate
builder_result = self.build_activate(self.env_name_or_prefix)
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\activate.py", line 288, in build_activate
return self._build_activate_stack(env_name_or_prefix, False)
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\activate.py", line 314, in _build_activate_stack
conda_prompt_modifier = self._prompt_modifier(prefix, conda_default_env)
File "C:\Users\owner\Anaconda3\lib\site-packages\conda\activate.py", line 639, in _prompt_modifier
name=basename(prefix),
KeyError: 'openSim'
`$ C:\Users\owner\Anaconda3\Scripts\conda-script.py shell.cmd.exe activate C:\Users\owner\Anaconda3`
environment variables:
CIO_TEST=<not set>
CONDA_BAT=C:\Users\owner\Anaconda3\condabin\conda.bat
CONDA_EXE=C:\Users\owner\Anaconda3\condabin\..\Scripts\conda.exe
CONDA_ROOT=C:\Users\owner\Anaconda3
CONDA_SHLVL=0
GIT_LFS_PATH=C:\Program Files\Git LFS
HOMEPATH=\Users\owner
PATH=C:\Users\owner\Anaconda3;C:\Users\owner\Anaconda3\Library\mingw-w64\bi
n;C:\Users\owner\Anaconda3\Library\usr\bin;C:\Users\owner\Anaconda3\Li
brary\bin;C:\Users\owner\Anaconda3\Scripts;C:\Users\owner\Anaconda3\bi
n;C:\Users\owner\Anaconda3\condabin;C:\Users\owner\Documents\R\win-
library\3.3\Rtools\bin;C:\Program Files (x86)\Common
Files\Oracle\Java\javapath;C:\Program Files
(x86)\STMicroelectronics\st_toolset\asm;C:\Program Files
(x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOW
S\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\Win
dowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management
Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management
Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management
Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management
Engine Components\IPT;C:\Program Files\Microsoft SQL
Server\110\Tools\Binn\;C:\Program Files (x86)\Microsoft
SDKs\TypeScript\1.0\;C:\Program Files\Microsoft SQL
Server\120\Tools\Binn\;C:\Users\owner\.dnx\bin;C:\Program
Files\Microsoft DNX\Dnvm\;C:\Program Files\Microsoft SQL
Server\130\Tools\Binn\;C:\Program Files\nodejs\;C:\Program
Files\doxygen\bin;C:\Program Files\PuTTY\;C:\Program Files\Git
LFS;C:\Program Files\Git\cmd;C:\Program
Files\Git\mingw64\bin;C:\Program Files\Git\usr\bin;C:\WINDOWS\System32
\OpenSSH\;C:\Users\owner\Documents\Libraries\gradle-4.10.2\bin;C:\Andr
oid;C:\Windows\System32;C:\Users\owner\Anaconda3;C:\Users\owner\Anacon
da3\Scripts;C:\Users\owner\Anaconda3\Library\bin;C:\OpenSim 3.3\bin;C:
\Users\owner\Anaconda3;C:\Users\owner\Anaconda3\Library\mingw-w64\bin;
C:\Users\owner\Anaconda3\Library\usr\bin;C:\Users\owner\Anaconda3\Libr
ary\bin;C:\Users\owner\Anaconda3\Scripts;C:\Users\owner\AppData\Local\
Microsoft\WindowsApps;C:\Program Files (x86)\FCIV;C:\Users\owner\AppDa
ta\Roaming\npm;C:\Users\owner\Downloads\swigwin-3.0.12\swigwin-3.0.12\
;C:\Users\owner\AppData\Local\Google\Cloud SDK\google-cloud-
sdk\bin;MSVCP140.DLL;C:\Users\owner\AppData\Local\Programs\Microsoft
VS Code\bin;C:\flutter\bin;C:\Users\owner\AppData\Local\Android\Sdk\to
ols;C:\Users\owner\AppData\Local\Android\Sdk\platform-
tools;C:\Users\owner\AppData\Local\Android\Sdk\build-
tools\28.0.3;C:\Users\owner\AppData\Roaming\Pub\Cache\bin;C:\Program
Files (x86)\Microsoft Visual Studio\Installer
PROTOC_PATH=C:\Users\owner\Documents\Libraries\protobuf-3.3.0\src\protoc\Debug\pro
toc.exe
PSMODULEPATH=;C:\Users\owner\AppData\Local\Google\Cloud SDK\google-cloud-
sdk\platform\PowerShell
PYTHONIOENCODING=UTF-8
REQUESTS_CA_BUNDLE=<not set>
SSL_CERT_FILE=<not set>
active environment : None
shell level : 0
user config file : C:\Users\owner\.condarc
populated config files : C:\Users\owner\.condarc
conda version : 4.7.12
conda-build version : 3.18.9
python version : 3.7.4.final.0
virtual packages :
base environment : C:\Users\owner\Anaconda3 (writable)
channel URLs : https://repo.anaconda.com/pkgs/main/win-64
https://repo.anaconda.com/pkgs/main/noarch
https://repo.anaconda.com/pkgs/r/win-64
https://repo.anaconda.com/pkgs/r/noarch
https://repo.anaconda.com/pkgs/msys2/win-64
https://repo.anaconda.com/pkgs/msys2/noarch
package cache : C:\Users\owner\Anaconda3\pkgs
C:\Users\owner\.conda\pkgs
C:\Users\owner\AppData\Local\conda\conda\pkgs
envs directories : C:\Users\owner\Anaconda3\envs
C:\Users\owner\.conda\envs
C:\Users\owner\AppData\Local\conda\conda\envs
platform : win-64
user-agent : conda/4.7.12 requests/2.22.0 CPython/3.7.4 Windows/10 Windows/10.0.18362
administrator : False
netrc file : None
offline mode : False
An unexpected error has occurred. Conda has prepared the above report.
A similar error happens if I try to create a new environment and activate it. Any hint on what could be causing it? I see that that it's complaining about KeyError: 'openSim'. But I'm not sure what could be the root cause. The error message is not very explicit or at least I couldn't get anything from it.
I tried uninstalling Anaconda and OpenSim and installing them again with no luck in resolving the issue. Any hint is appreciated.
I found the solution to the problem which is so random that I thought I share it here. It's not easy (almost impossible) to figure out.
It looked like some configurations were cached and had to be manually deleted since even a fresh install of anaconda didn't resolve the issue.
I had to delete .condarc file in the anaconda directory to solve this issue.
For more info read this.

Error with simulation using INET in OMNeT++

I had been making simulations using INET with no problem, but suddenly I got an error and I don't know why. I don´t remember doing anything strange.
I decided to test with an empty workspace to see if I did something wrong in the one that I was working in. I installed INET with the dialog that appears whith the empty workspace. Then I created a new empty simulation project, and when I run it, I only get the message that says there is no network, but it works. But when I set INET as reference project in the properties of the empty project, it doesn't run and I get the following error messages:
OMNeT++ Discrete Event Simulation (C) 1992-2019 Andras Varga, OpenSim Ltd.
Version: 5.5, build: 190529-d97ebbb173, edition: Academic Public License -- NOT FOR COMMERCIAL USE
See the license for distribution terms and warranty disclaimer
<!> Error: Cannot load library '../../inet/src//libINET_dbg.dll': No se encontró el proceso especificado
End.
Simulation terminated with exit code: 1
Working directory: C:/Users/comec/Desktop/test/test/simulations
Command line: ../src/test_dbg.exe -m -n ../src;.;../../inet/src;../../inet/examples;../../inet/tutorials;../../inet/showcases --image-path=../../inet/images -l ../../inet/src/INET omnetpp.ini
Environment variables:
PATH=;C:/Users/comec/Desktop/test/inet/src;C:\omnetpp-5.5\bin;C:\omnetpp-5.5\tools\win64\mingw64\bin;C:\omnetpp-5.5\tools\win64\usr\bin;;C:/omnetpp-5.5/ide/jre/bin/server;C:/omnetpp-5.5/ide/jre/bin;C:/omnetpp-5.5/ide/jre/lib/amd64;C:\Program Files\Python37\Scripts\;C:\Program Files\Python37\;C:\Program Files\Python38\Scripts\;C:\Program Files\Python38\;C:\Program Files (x86)\Common Files\Oracle\Java\javapath;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\WINDOWS\System32\OpenSSH\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\MiKTeX 2.9\miktex\bin\x64\;C:\dart-sass;C:\Program Files\dotnet\;C:\Program Files\Microsoft SQL Server\130\Tools\Binn\;C:\Program Files\Microsoft SQL Server\Client SDK\ODBC\170\Tools\Binn\;C:\Program Files\doxygen\bin;C:\Program Files (x86)\Eclipse\Sumo\bin\;C:\Program Files (x86)\Eclipse\Sumo\tools\;C:\Program Files\PuTTY\;C:\Strawberry\c\bin;C:\Strawberry\perl\site\bin;C:\Strawberry\perl\bin;C:\Program Files\Git\cmd;C:\Users\comec\AppData\Local\Microsoft\WindowsApps;C:\intelFPGA_lite\18.1\modelsim_ase\win32aloem;C:\Users\comec\AppData\Local\atom\bin;C:\Users\comec\AppData\Local\Microsoft\WindowsApps;C:\texlive\2019\bin\win32;C:\omnetpp-5.5\ide;
OMNETPP_IMAGE_PATH=C:\omnetpp-5.5\images
Does anyone know how can I solve this?
By default INET is built in release mode, from the above output, it seems that your own project is set to be built in debug mode and that's why it fails during linking. The debug version of inet (libINET_dbg) was not built. You should either switch your own project to release or rebuild INET in debug mode, too.

Execution error when out-of stack enviroment, using text-icu on windows

I wrote some code. and fixed some errors with the help of good persons.
Now, this utility(samChecker-exe.exe) works properly in Stack environment.
This utility use text-icu and I coded this utility on windows. Of course, I want to work this utility on other windows OS.
I copied %stackPath%.stack-work\install\~\bin\samCheceker-exe.exe to some other folder, and execution through CMD.
But I got error message that says "libicuuc57.dll dose not exist. so program can't start. please re-install the program."
I copied libicuuc57.dll, and so... as like programming newbies, but failed. "stack install" command was the same result.
(I installed text-icu and installed ICU lib. on windows. The input file encoded in "MS949")
With help of Francesco Ariis from (beginners#haskell.org), I stepped forward.
But still got error message.
C:\Users\shaeg\Documents\Haskell\samChecker3> stack build --ghc-options="-static -optl-static"
Warning: File listed in samChecker3.cabal file does not exist: README.md
samChecker3-0.1.0.0: unregistering (local file changes: app\Main.hs samChecker3.cabal src\Lib.hs test\Spec.hs)
samChecker3-0.1.0.0: configure (lib + exe)
Configuring samChecker3-0.1.0.0...
samChecker3-0.1.0.0: build (lib + exe)
Preprocessing library samChecker3-0.1.0.0...
[1 of 1] Compiling Lib ( src\Lib.hs, .stack-work\dist\ca59d0ab\build\Lib.o )
Preprocessing executable 'samChecker3-exe' for samChecker3-0.1.0.0...
[1 of 1] Compiling Main ( app\Main.hs, .stack-work\dist\ca59d0ab\build\samChecker3-exe\samChecker3-exe-tmp\Main.o )
Linking .stack-work\dist\ca59d0ab\build\samChecker3-exe\samChecker3-exe.exe ...
C:/Users/shaeg/AppData/Local/Programs/stack/x86_64-windows/ghc-8.0.2/mingw/bin/ld.exe: cannot find -licuuc
C:/Users/shaeg/AppData/Local/Programs/stack/x86_64-windows/ghc-8.0.2/mingw/bin/ld.exe: cannot find -licuin
C:/Users/shaeg/AppData/Local/Programs/stack/x86_64-windows/ghc-8.0.2/mingw/bin/ld.exe: cannot find -licudt
collect2.exe: error: ld returned 1 exit status
`gcc.exe' failed in phase `Linker'. (Exit code: 1)
Warning: File listed in samChecker3.cabal file does not exist: README.md
-- While building package samChecker3-0.1.0.0 using:
C:\sr\setup-exe-cache\x86_64-windows\Cabal-simple_Z6RU0evB_1.24.2.0_ghc-8.0.2.exe --builddir=.stack-work\dist\ca59d0ab build lib:samChecker3 exe:samChecker3-exe --ghc-options " -ddump-hi -ddump-to-file"
Process exited with code: ExitFailure 1
[stack path] results
extra-include-dirs: C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include
extra-library-dirs: C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib
According to first error message(libicuuc57.dll dose not exist. so program can't start. please re-install the program.), I find the path for libicuuc57.dll, and re-set the extra-library-dirs.
C:\Users\shaeg\Documents\Haskell\samChecker3>stack build --extra-lib-dirs=C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\bin --ghc-options="-static -optl-static"
But got the same result.
libicuuc75.dll, libicuin57.dll etc files is located in C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\bin
Someones says, this is Linker Acting.
How can I fix this error?
Thank you so much.
Sincerely, S. Chang.
Here is my stack path.
C:\Users\shaeg\Documents\Haskell\samChecker3>stack path
stack-root: C:\sr
project-root: C:\Users\shaeg\Documents\Haskell\samChecker3
config-location: C:\Users\shaeg\Documents\Haskell\samChecker3\stack.yaml
bin-path: .;C:\sr\snapshots\7dd4ddea\bin;C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.2\bin;C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.2\mingw\bin;C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\bin;C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\usr\bin;C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\usr\local\bin;C:\Program Files (x86)\Intel\iCLS Client\;C:\Program Files\Intel\iCLS Client\;C:\WINDOWS\system32;C:\WINDOWS;C:\WINDOWS\System32\Wbem;C:\WINDOWS\System32\WindowsPowerShell\v1.0\;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files\Intel\Intel(R) Management Engine Components\DAL;C:\Program Files (x86)\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\Intel(R) Management Engine Components\IPT;C:\Program Files\Intel\IntelSGXPSW\bin\x64\Release\;C:\Program Files\Intel\IntelSGXPSW\bin\win32\Release\;c:\Program Files\Intel\WiFi\bin\;c:\Program Files\Common Files\Intel\WirelessCommon\;C:\Program Files\Hewlett-Packard\SimplePass\;C:\Users\shaeg\AppData\Roaming\local\bin;C:\Users\shaeg\AppData\Local\Microsoft\WindowsApps
programs: C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows
compiler-exe: C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.2\bin\ghc.EXE
compiler-bin: C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.2\bin
local-bin: C:\Users\shaeg\AppData\Roaming\local\bin
extra-include-dirs: C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\include
extra-library-dirs: C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\msys2-20150512\mingw64\lib
snapshot-pkg-db: C:\sr\snapshots\7dd4ddea\pkgdb
local-pkg-db: C:\Users\shaeg\Documents\Haskell\samChecker3\.stack-work\install\02136e14\pkgdb
global-pkg-db: C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.2\lib\package.conf.d
ghc-package-path: C:\Users\shaeg\Documents\Haskell\samChecker3\.stack-work\install\02136e14\pkgdb;C:\sr\snapshots\7dd4ddea\pkgdb;C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.2\lib\package.conf.d
snapshot-install-root: C:\sr\snapshots\7dd4ddea
local-install-root: C:\Users\shaeg\Documents\Haskell\samChecker3\.stack-work\install\02136e14
snapshot-doc-root: C:\sr\snapshots\7dd4ddea\doc
local-doc-root: C:\Users\shaeg\Documents\Haskell\samChecker3\.stack-work\install\02136e14\doc
dist-dir: .stack-work\dist\ca59d0ab
local-hpc-root: C:\Users\shaeg\Documents\Haskell\samChecker3\.stack-work\install\02136e14\hpc
local-bin-path: C:\Users\shaeg\AppData\Roaming\local\bin
ghc-paths: C:\Users\shaeg\AppData\Local\Programs\stack\x86_64-windows
I was able to test it recently, and share my solution.
First of all, I assume environment of latest msys2 which is installed mingw64/mingw-w64-x86_64-icu 57.1-2 package.
Dynamic linking
Executable which dynamically linked has dependencies to libgcc_s_seh-1.dll libicudt57.dll libicuin57.dll libicuuc57.dll libstdc++-6.dll libwinpthread-1.dll under stack's msys2 mingw64/bin path. If you have already built dynamic linked executable, copying all of them to same directory will solve the problem.
Dependency walker in my comment can help to reveal all of these dependencies.
Static linking
Currently text-icu package doesn't seem to support static linking. So we should modify it ourselves. If you don't know how to make it into local package, note the third option of this.
Modify text-icu-0.7.0.1's .cabal file extra-libraries section to the following.
extra-libraries: sicuin sicuuc sicudt
-- if os(mingw32)
-- extra-libraries: icuin icudt
-- else
-- extra-libraries: icui18n icudata
Append -pgmlC:\Users\[USERNAME]\AppData\Local\Programs\stack\x86_64-windows\ghc-8.0.2\mingw\bin\g++.exe to your executable's ghc-options cabal entry. This is required to link to ICU's C++ symbols.
Then just do stack build.

Inf2Cat Error 22.9.12 - INF cannot be copied to %Windir%

I am making a driver official for Windows 7 as it it unsigned and the process to disable things to make the unsigned driver work is much more hassle then to actually sign the driver.
Well, in order to sign the driver, first I need to make the catalog file for the driver using the latest Inf2Cat from the Windows Driver Development Kit, all is going really well and there are no warnings but there is one error -
C:\Users\User\Downloads\dsdriv\dsdriv>"C:\Program Files (x86)\Windows Kits\8.1\bin\x86\Inf2Cat.exe" /driver:C:\Users\Support\Downloads\dsdriv\dsdriv /os:XP_X64,Server2003_X64,Vista_X64,
7_X64
................................
Signability test failed.
Errors:
22.9.12: INF file (\driver.inf) cannot be copied to %windir%\inf.
Warnings:
None
I've look around Google and I found results of where people have has similar errors but the solution was not explained, then I tried to use the Chkinf.bat utility that comes with the kit to help me find the error with the INF file but I came across a very strange error that the syntax of the command was incorrect, however I wrote the batch to check the INF file exactly to the Chkinf Documentation and yet it was still coming up with the syntax error, here is the bat that I compiled to check the driver.inf file -
"C:\Program Files (x86)\Windows Kits\8.1\Tools\x86\ChkInf\chkinf" "C:\Users\User\Downloads\dsdriv\dsdriv\driver.inf"
I also tried -
"C:\Program Files (x86)\Windows Kits\8.1\Tools\x86\ChkInf\chkinf.bat" "C:\Users\User\Downloads\dsdriv\dsdriv\driver.inf"
and -
"C:\Program Files (x86)\Windows Kits\8.1\Tools\x86\ChkInf\chkinf" C:\Users\User\Downloads\dsdriv\dsdriv\driver.inf /L results.txt /B /LO
but no use.
The ChkInf may not be present in any of the above directories. It is shipped along the WinDDK.
You can find it exactly at
WinDDK_InstalledPath\Version_of_WinDDK\tools\Chkinf\chkinf.bat
The issue could be due to the [SourceDisksFiles] containing INF copy directives

Resources