question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Error loading config

See original GitHub issue

Hello

I"m trying to load a simple configuration to my auto generated http4s server v0.20.0

My load method is this And I load it like this

And I constantly getting the error below:

info] Running tsp.Main 
[error] (run-main-1) pureconfig.error.ConfigReaderException: Cannot convert configuration to a config.package$Config. Failures are:
[error]   at the root:
[error]     - Key not found: 'application'.
[error] pureconfig.error.ConfigReaderException: Cannot convert configuration to a config.package$Config. Failures are:
[error]   at the root:
[error]     - Key not found: 'application'.

How do I fix that ? Thank you

Issue Analytics

  • State:closed
  • Created 4 years ago
  • Comments:5

github_iconTop GitHub Comments

1reaction
tamplercommented, May 2, 2019

Thanks, @leifwickland I made it work with the following:

val configFile  = Paths.get ("./src/main/resources/application.conf")
def load(path: Path = configFile): IO[Config] = loadConfigF[IO,Config](path)

However, I’m still not happy with my load. I need to launch the end-of-the-world, like this to load it. I saw a better solution here. It worked in HTTP4s 0.18.22 inside a fs2.Stream like this. However, if I try to do the same trick in my HTTP4s v.0.20.0, I get the following:

[error] /home/bku/work/clover/front/src/main/scala/Server.scala:48:5: type mismatch;    │
[error]  found   : fs2.Stream[[x]Any,fs2.INothing]                                      │
[error]  required: fs2.Stream[F,Nothing]                                                │
[error]   }.drain                                                                       │
[error]     ^                                                                           │
[error] one error found 

How can I fix this ?

1reaction
leifwicklandcommented, May 2, 2019

Pureconfig is simply passing the path to typesafe-config. Using a path relative to the current directory should work.

Read more comments on GitHub >

github_iconTop Results From Across the Web

Error loading config file | Journalbeat Reference [7.15] - Elastic
an unauthorized user tries to load the config file, or; the config file has the wrong permissions. See Config File Ownership and Permissions...
Read more >
What does "Error loading configuration file" mean?
Questions and Answers: 1. By what kind of operation does it occur? If the configuration file is missing or corrupted. 2. At what...
Read more >
Error loading config file · Issue #610 · vscode-kubernetes-tools ...
It is throwing the error because /home/d4nyll/.kube/config is a directory, and not a configuration file. However, this should not be an ...
Read more >
Error loading config file: java.net.UnknownHostException ...
2337717 - Error loading config file: java.net.UnknownHostException: sapmnt. Symptom. There is an SSL communication failure on the server. Traces (such as ...
Read more >
error loading config from prometheus yml couldn t ... - Edureka
error loading config from prometheus yml couldn t load configuration --config file prometheus yml parsing YAML file prometheus yml yaml ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found