问:
Selenium::WebDriver::Error::UnknownError: unknown error: net::ERR_CONNECTION_REFUSED Docker Capybara ROR 6
I am trying to run capybara test for minitest through docker-compose and I can no longer connect to my selenium chrome browser. It complains that the connection is failing. The service itself, begins to spin up when the tests are run. How can I properly connect my rails application to the chrome service setup? Mind you, we do use subdomains -- so there will always be a test running with it set.

```<code>Error:
HelloWorldCapybaraTest#test_testing_navigation:
Selenium::WebDriver::Error::UnknownError: unknown error: net::ERR_CONNECTION_REFUSED
  (Session info: chrome=108.0.5359.98)
    test/features/hello_world_capybara_test.rb:12:in `block in <class:HelloWorldCapybaraTest>'
</code>```

docker-compose.yml

```<code>  web:
    init: true
    build: ~/projects/web/
    container_name: testme
    restart: unless-stopped
    ports:
      - "3000:3000"
      - "5000:5000"
    volumes:
      - ~/projects/web:/web
      - /web/node_modules
    depends_on:
      - mongo
    links:
      - elasticsearch
      - selenium_chrome
    command: sh -c "./docker_scripts/run-rails.sh"
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - PGHOST=postgres
      - MONGODB_USER=admin
      - MONGODB_PASSWORD=root
      - MONGODB_URL=mongo:27017
      - RAILS_ENV=development
    tty: true
    stdin_open: true
  selenium_chrome:
    image: selenium/standalone-chrome
    privileged: true
    ports:
      - "5900:5900"
      - "4444:4444"
      - "7900:7900"
</code>```

test_helper.rb

```<code>WebMock.allow_net_connect!
require 'capybara/rails'
require 'capybara/minitest'
require 'capybara/dsl'
require 'webdrivers'

class ActionDispatch::IntegrationTest
  include Capybara::DSL
  include Capybara::Minitest::Assertions
  config.include Rails.application.routes.url_helpers
  Capybara.default_max_wait_time = 10
  Capybara.run_server = false
  Capybara.default_driver = :selenium_chrome_in_container
  Capybara.always_include_port = true
  Capybara.server_host = "0.0.0.0"
  Capybara.server_port = 5000
  Capybara.javascript_driver = :selenium

  Capybara.register_driver :headless_selenium_chrome_in_container do |app|
    capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
      chromeOptions: { args: %w(headless disable-gpu disable-dev-shm-usage window-size=1440x768) }
    )

    Capybara::Selenium::Driver.new(app,
                                   :browser => :remote,
                                   url: "http://selenium_chrome:4444/wd/hub",
                                   capabilities: capabilities
    )
  end

  Capybara.register_driver :selenium_chrome_in_container do |app|
    Capybara::Selenium::Driver.new(app,
                                   :browser => :remote,
                                   url: "http://selenium_chrome:4444/wd/hub",
                                   capabilities: :chrome
    )
  end

  # Reset sessions and driver between tests
  teardown do
    Capybara.reset_sessions!
  end
end
</code>```

hello_world_capybara_test.rb

```<code>require 'test_helper'
class HelloWorldCapybaraTest < ActionDispatch::IntegrationTest
  setup do
    @company = create(:company)
    @mailing = create(:user)
    Capybara.server_host = '0.0.0.0'
    Capybara.server_port = 5000
    Capybara.app_host = "http://#{@company.subdomain}.lvh.me:5000"
  end

  test 'testing navigation' do
    visit new_user_session_url
  end
end
</code>```

Logs

```<code>web-selenium_chrome-1  | 19:43:35.809 INFO [LocalDistributor.newSession] - Session request received by the Distributor:
web-selenium_chrome-1  |  [Capabilities {browserName: chrome}]
web-selenium_chrome-1  | Starting ChromeDriver 108.0.5359.71 (1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359@{#1016}) on port 24771
web-selenium_chrome-1  | Only local connections are allowed.
web-selenium_chrome-1  | Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
web-selenium_chrome-1  | ChromeDriver was started successfully.
web-selenium_chrome-1  | [1671392615.878][SEVERE]: bind() failed: Cannot assign requested address (99)
web-selenium_chrome-1  | 19:43:37.496 INFO [LocalNode.newSession] - Session created by the Node. Id: 5fb54cb47e07699de29b43b00ecef29a, Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 108.0.5359.98, chrome: {chromedriverVersion: 108.0.5359.71 (1e0e3868ee06..., userDataDir: /tmp/.com.google.Chrome.PEanHy}, goog:chromeOptions: {debuggerAddress: localhost:39557}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: LINUX, proxy: Proxy(), se:cdp: http://localhost:39557, se:cdpVersion: 108.0.5359.98, se:vncEnabled: true, se:vncLocalAddress: ws://172.18.0.6:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
web-selenium_chrome-1  | 19:43:37.507 INFO [LocalDistributor.newSession] - Session created by the Distributor. Id: 5fb54cb47e07699de29b43b00ecef29a
web-selenium_chrome-1  |  Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 108.0.5359.98, chrome: {chromedriverVersion: 108.0.5359.71 (1e0e3868ee06..., userDataDir: /tmp/.com.google.Chrome.PEanHy}, goog:chromeOptions: {debuggerAddress: localhost:39557}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: LINUX, proxy: Proxy(), se:bidiEnabled: false, se:cdp: ws://172.18.0.6:4444/sessio..., se:cdpVersion: 108.0.5359.98, se:vnc: ws://172.18.0.6:4444/sessio..., se:vncEnabled: true, se:vncLocalAddress: ws://172.18.0.6:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
web-selenium_chrome-1  | 19:43:38.397 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "1d19d9608398dc55bfe4ff408f323fa2","eventTime": 1671392618396368100,"eventName": "HTTP request execution complete","attributes": {"http.flavor": 1,"http.handler_class": "org.openqa.selenium.remote.http.Route$PredicatedRoute","http.host": "selenium_chrome:4444","http.method": "POST","http.request_content_length": "45","http.scheme": "HTTP","http.status_code": 500,"http.target": "\u002fsession\u002f5fb54cb47e07699de29b43b00ecef29a\u002furl","http.user_agent": "selenium\u002f4.1.0 (ruby linux)"}}
web-selenium_chrome-1  |
web-selenium_chrome-1  | 19:43:38.926 INFO [LocalSessionMap.lambda$new$0] - Deleted session from local Session Map, Id: 5fb54cb47e07699de29b43b00ecef29a
web-selenium_chrome-1  | 19:43:38.929 INFO [GridModel.release] - Releasing slot for session id 5fb54cb47e07699de29b43b00ecef29a
web-selenium_chrome-1  | 19:43:38.931 INFO [SessionSlot.stop] - Stopping session 5fb54cb47e07699de29b43b00ecef29a
mongo                    | {"t":{"$date":"2022-12-18T19:43:47.530+00:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn31","msg":"Connection ended","attr":{"remote":"172.18.0.8:60484","connectionId":31,"connectionCount":27}}
mongo                    | {"t":{"$date":"2022-12-18T19:43:47.547+00:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "c
</code>```

Body:
I am trying to run capybara test for minitest through docker-compose and I can no longer connect to my selenium chrome browser. It complains that the connection is failing. The service itself, begins to spin up when the tests are run. How can I properly connect my rails application to the chrome service setup? Mind you, we do use subdomains -- so there will always be a test running with it set.

Error:
HelloWorldCapybaraTest#test_testing_navigation:
Selenium::WebDriver::Error::UnknownError: unknown error: net::ERR_CONNECTION_REFUSED
  (Session info: chrome=108.0.5359.98)
    test/features/hello_world_capybara_test.rb:12:in `block in <class:HelloWorldCapybaraTest>'

docker-compose.yml

  web:
    init: true
    build: ~/projects/web/
    container_name: testme
    restart: unless-stopped
    ports:
      - "3000:3000"
      - "5000:5000"
    volumes:
      - ~/projects/web:/web
      - /web/node_modules
    depends_on:
      - mongo
    links:
      - elasticsearch
      - selenium_chrome
    command: sh -c "./docker_scripts/run-rails.sh"
    environment:
      - POSTGRES_USER=postgres
      - POSTGRES_PASSWORD=postgres
      - PGHOST=postgres
      - MONGODB_USER=admin
      - MONGODB_PASSWORD=root
      - MONGODB_URL=mongo:27017
      - RAILS_ENV=development
    tty: true
    stdin_open: true
  selenium_chrome:
    image: selenium/standalone-chrome
    privileged: true
    ports:
      - "5900:5900"
      - "4444:4444"
      - "7900:7900"

test_helper.rb

WebMock.allow_net_connect!
require 'capybara/rails'
require 'capybara/minitest'
require 'capybara/dsl'
require 'webdrivers'

class ActionDispatch::IntegrationTest
  include Capybara::DSL
  include Capybara::Minitest::Assertions
  config.include Rails.application.routes.url_helpers
  Capybara.default_max_wait_time = 10
  Capybara.run_server = false
  Capybara.default_driver = :selenium_chrome_in_container
  Capybara.always_include_port = true
  Capybara.server_host = "0.0.0.0"
  Capybara.server_port = 5000
  Capybara.javascript_driver = :selenium

  Capybara.register_driver :headless_selenium_chrome_in_container do |app|
    capabilities = Selenium::WebDriver::Remote::Capabilities.chrome(
      chromeOptions: { args: %w(headless disable-gpu disable-dev-shm-usage window-size=1440x768) }
    )

    Capybara::Selenium::Driver.new(app,
                                   :browser => :remote,
                                   url: "http://selenium_chrome:4444/wd/hub",
                                   capabilities: capabilities
    )
  end

  Capybara.register_driver :selenium_chrome_in_container do |app|
    Capybara::Selenium::Driver.new(app,
                                   :browser => :remote,
                                   url: "http://selenium_chrome:4444/wd/hub",
                                   capabilities: :chrome
    )
  end

  # Reset sessions and driver between tests
  teardown do
    Capybara.reset_sessions!
  end
end

hello_world_capybara_test.rb

require 'test_helper'
class HelloWorldCapybaraTest < ActionDispatch::IntegrationTest
  setup do
    @company = create(:company)
    @mailing = create(:user)
    Capybara.server_host = '0.0.0.0'
    Capybara.server_port = 5000
    Capybara.app_host = "http://#{@company.subdomain}.lvh.me:5000"
  end

  test 'testing navigation' do
    visit new_user_session_url
  end
end

Logs

web-selenium_chrome-1  | 19:43:35.809 INFO [LocalDistributor.newSession] - Session request received by the Distributor:
web-selenium_chrome-1  |  [Capabilities {browserName: chrome}]
web-selenium_chrome-1  | Starting ChromeDriver 108.0.5359.71 (1e0e3868ee06e91ad636a874420e3ca3ae3756ac-refs/branch-heads/5359@{#1016}) on port 24771
web-selenium_chrome-1  | Only local connections are allowed.
web-selenium_chrome-1  | Please see https://chromedriver.chromium.org/security-considerations for suggestions on keeping ChromeDriver safe.
web-selenium_chrome-1  | ChromeDriver was started successfully.
web-selenium_chrome-1  | [1671392615.878][SEVERE]: bind() failed: Cannot assign requested address (99)
web-selenium_chrome-1  | 19:43:37.496 INFO [LocalNode.newSession] - Session created by the Node. Id: 5fb54cb47e07699de29b43b00ecef29a, Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 108.0.5359.98, chrome: {chromedriverVersion: 108.0.5359.71 (1e0e3868ee06..., userDataDir: /tmp/.com.google.Chrome.PEanHy}, goog:chromeOptions: {debuggerAddress: localhost:39557}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: LINUX, proxy: Proxy(), se:cdp: http://localhost:39557, se:cdpVersion: 108.0.5359.98, se:vncEnabled: true, se:vncLocalAddress: ws://172.18.0.6:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
web-selenium_chrome-1  | 19:43:37.507 INFO [LocalDistributor.newSession] - Session created by the Distributor. Id: 5fb54cb47e07699de29b43b00ecef29a
web-selenium_chrome-1  |  Caps: Capabilities {acceptInsecureCerts: false, browserName: chrome, browserVersion: 108.0.5359.98, chrome: {chromedriverVersion: 108.0.5359.71 (1e0e3868ee06..., userDataDir: /tmp/.com.google.Chrome.PEanHy}, goog:chromeOptions: {debuggerAddress: localhost:39557}, networkConnectionEnabled: false, pageLoadStrategy: normal, platformName: LINUX, proxy: Proxy(), se:bidiEnabled: false, se:cdp: ws://172.18.0.6:4444/sessio..., se:cdpVersion: 108.0.5359.98, se:vnc: ws://172.18.0.6:4444/sessio..., se:vncEnabled: true, se:vncLocalAddress: ws://172.18.0.6:7900, setWindowRect: true, strictFileInteractability: false, timeouts: {implicit: 0, pageLoad: 300000, script: 30000}, unhandledPromptBehavior: dismiss and notify, webauthn:extension:credBlob: true, webauthn:extension:largeBlob: true, webauthn:virtualAuthenticators: true}
web-selenium_chrome-1  | 19:43:38.397 WARN [SeleniumSpanExporter$1.lambda$export$3] - {"traceId": "1d19d9608398dc55bfe4ff408f323fa2","eventTime": 1671392618396368100,"eventName": "HTTP request execution complete","attributes": {"http.flavor": 1,"http.handler_class": "org.openqa.selenium.remote.http.Route$PredicatedRoute","http.host": "selenium_chrome:4444","http.method": "POST","http.request_content_length": "45","http.scheme": "HTTP","http.status_code": 500,"http.target": "\u002fsession\u002f5fb54cb47e07699de29b43b00ecef29a\u002furl","http.user_agent": "selenium\u002f4.1.0 (ruby linux)"}}
web-selenium_chrome-1  |
web-selenium_chrome-1  | 19:43:38.926 INFO [LocalSessionMap.lambda$new$0] - Deleted session from local Session Map, Id: 5fb54cb47e07699de29b43b00ecef29a
web-selenium_chrome-1  | 19:43:38.929 INFO [GridModel.release] - Releasing slot for session id 5fb54cb47e07699de29b43b00ecef29a
web-selenium_chrome-1  | 19:43:38.931 INFO [SessionSlot.stop] - Stopping session 5fb54cb47e07699de29b43b00ecef29a
mongo                    | {"t":{"$date":"2022-12-18T19:43:47.530+00:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "ctx":"conn31","msg":"Connection ended","attr":{"remote":"172.18.0.8:60484","connectionId":31,"connectionCount":27}}
mongo                    | {"t":{"$date":"2022-12-18T19:43:47.547+00:00"},"s":"I",  "c":"NETWORK",  "id":22944,   "c


来源: stackexchange

问:
creating a simpel db with: item, quantity, item minimum, item maximum
I want to create a database, which consists of the following data: item, quantity, item minimum, item maximum.

a qr code must also be scanned with a usb scanner, after the qr code has been scanned, the article number must be reduced.

i tried it in excel but this doesn't seem to function correctly as i expect

ContentLicense: CC BY-SA 4.0


问:
temperature conversion with ONLY ONE field
How can I convert to different measurement systems if I can't create another UNIT field to understand which system I need to convert to?

```<code>class Temperature{
    private final double tm;
    Temperature(double tm, char unit) {
        this.tm = tm;

    }
    public double getInC(){

    }
    public double getInF(){

    }
    public double getInK(){

    }
}
public class Temperatures {
    public static void main(String[] args) {
        Temperature t1 = new Temperature(25, 'C');
        System.out.printf("C: %6.2f%n", t1.getInC());
        System.out.printf("F: %6.2f%n", t1.getInF());
        System.out.printf("K: %6.2f%n", t1.getInK());
        Temperature t2 = new Temperature(77, 'F');
        System.out.printf("C: %6.2f%n", t2.getInC());
        System.out.printf("F: %6.2f%n", t2.getInF());
        System.out.printf("K: %6.2f%n", t2.getInK());
        Temperature t3 = new Temperature(298.15, 'K');
        System.out.printf("C: %6.2f%n", t3.getInC());
        System.out.printf("F: %6.2f%n", t3.getInF());
        System.out.printf("K: %6.2f%n", t3.getInK());
    }
}
</code>```

Idk what to do about the fact that I can't create another field

Body:
How can I convert to different measurement systems if I can't create another UNIT field to understand which system I need to convert to?

class Temperature{
    private final double tm;
    Temperature(double tm, char unit) {
        this.tm = tm;

    }
    public double getInC(){

    }
    public double getInF(){

    }
    public double getInK(){

    }
}
public class Temperatures {
    public static void main(String[] args) {
        Temperature t1 = new Temperature(25, 'C');
        System.out.printf("C: %6.2f%n", t1.getInC());
        System.out.printf("F: %6.2f%n", t1.getInF());
        System.out.printf("K: %6.2f%n", t1.getInK());
        Temperature t2 = new Temperature(77, 'F');
        System.out.printf("C: %6.2f%n", t2.getInC());
        System.out.printf("F: %6.2f%n", t2.getInF());
        System.out.printf("K: %6.2f%n", t2.getInK());
        Temperature t3 = new Temperature(298.15, 'K');
        System.out.printf("C: %6.2f%n", t3.getInC());
        System.out.printf("F: %6.2f%n", t3.getInF());
        System.out.printf("K: %6.2f%n", t3.getInK());
    }
}

Idk what to do about the fact that I can't create another field


问:
Multiplying two sub-matrices in NumPy without copying the matrices
I have two matrices A and B and I'm interested in multiplying a sub-matrix of A (defined by some of its rows) and a sub-matrix of B (defined by some of its columns) as shown in the example below:

import numpy as np

# create two matrices
A = np.ones((5, 3))
B = np.ones((3, 5))

# define sub-matrices
rows_idx = [0, 2, 3]
cols_idx = [1, 2, 4]

# print sub-matrices
print(A[rows_idx])
print(B[:, cols_idx])
```
<p>I'm aware that this can be achieved directly through</p>
<pre class="lang-py prettyprint-override"><code>A[rows_idx, :] @ B[:, cols_idx]
</code>```

However, the latter comes with the drawback of making copies of the rows of A and columns of B since rows_idx and cols_idx are lists, as mentioned here.
This is less efficient in terms of time and memory.

Also, I refrained from creating a Python function to perform the multiplication as Python loops are slow. Numpy array operations are much faster. Here are some timing comparisons.

Is there way to compute A[rows_idx, :] @ B[:, cols_idx] without copying?

Body:
I have two matrices A and B and I'm interested in multiplying a sub-matrix of A (defined by some of its rows) and a sub-matrix of B (defined by some of its columns) as shown in the example below:

import numpy as np

# create two matrices
A = np.ones((5, 3))
B = np.ones((3, 5))

# define sub-matrices
rows_idx = [0, 2, 3]
cols_idx = [1, 2, 4]

# print sub-matrices
print(A[rows_idx])
print(B[:, cols_idx])

I'm aware that this can be achieved directly through

A[rows_idx, :] @ B[:, cols_idx]

However, the latter comes with the drawback of making copies of the rows of A and columns of B since rows_idx and cols_idx are lists, as mentioned here.
This is less efficient in terms of time and memory.

Also, I refrained from creating a Python function to perform the multiplication as Python loops are slow. Numpy array operations are much faster. Here are some timing comparisons.

Is there way to compute A[rows_idx, :] @ B[:, cols_idx] without copying?


问:
Pytest - patched function returns mock instead of value
I've the following very simply testcase, which for some unknown reason returns mock (for do2() ) instead of a json:

```<code>def return_json():
    return json.dumps({'a': 5})

def test_700():
    with patch('app.main.Pack') as mocked_pack:
        mocked_pack.do2 = return_json() #####
        with app.test_client() as c:
            resp = c.get('/popular/')
            assert resp.status_code == 200
</code>```

I tried to use return_value and similar things, but I always get the traceback: the JSON object must be str, bytes or bytearray, not MagicMock . I think the problem should be how I patch it, but I can't find out.
Could anyone point out how can I return a real value for do2(), not only a mock?

My setup is as this:

```<code>#main.py
from persen import Pack

def popular_view():
    my_pack = Pack(name='peter', age='25')
    response = my_pack.do2()
try:
    json.loads(response)
except Exception as e:
    print('E1 = ', e)

#persen.py
class Pack:
    def __init__(self, name, age):
        ...

    def do1(self):
        ...

    def do2(self):
        return '600a'
</code>```

Body:
I've the following very simply testcase, which for some unknown reason returns mock (for do2() ) instead of a json:

def return_json():
    return json.dumps({'a': 5})

def test_700():
    with patch('app.main.Pack') as mocked_pack:
        mocked_pack.do2 = return_json() #####
        with app.test_client() as c:
            resp = c.get('/popular/')
            assert resp.status_code == 200

I tried to use return_value and similar things, but I always get the traceback: the JSON object must be str, bytes or bytearray, not MagicMock . I think the problem should be how I patch it, but I can't find out.
Could anyone point out how can I return a real value for do2(), not only a mock?

My setup is as this:

#main.py
from persen import Pack

def popular_view():
    my_pack = Pack(name='peter', age='25')
    response = my_pack.do2()
try:
    json.loads(response)
except Exception as e:
    print('E1 = ', e)

#persen.py
class Pack:
    def __init__(self, name, age):
        ...

    def do1(self):
        ...

    def do2(self):
        return '600a'


问:
FXMLLoader.load(getClass().getResource()) gives null
I'm trying to make tests using TestFX. But when calling this code I get an error.

```<code>@ExtendWith(ApplicationExtension.class)
class HelloApplicationTest extends ApplicationTest {
    public double x, y;

    @Start
    @Override
    public void start(Stage stage) throws Exception {
        Parent root = FXMLLoader.load(Objects.requireNonNull(getClass().getResource("fxml/Home.fxml")));
        stage.initStyle(StageStyle.UNDECORATED);

        root.setOnMousePressed(event -> {
            x = stage.getX() - event.getSceneX();
            y = stage.getY() - event.getSceneY();
        });

        root.setOnMouseDragged(event -> {
            stage.setX(event.getSceneX() + x);
            stage.setY(event.getSceneY() + y);
        });

        stage.setScene(new Scene(root, 606, 614));
        stage.show();
    }
}
</code>```

Error:

```--- Exception in Async Thread ---
java.lang.reflect.InvocationTargetException: null
    java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:116)
    java.base/java.lang.reflect.Method.invoke(Method.java:578)
    org.testfx.framework.junit5.ApplicationExtension$AnnotationBasedApplicationFixture.start(ApplicationExtension.java:158)
    org.testfx.framework.junit5.ApplicationAdapter.start(ApplicationAdapter.java:37)
    org.testfx.toolkit.impl.ApplicationServiceImpl.lambda$start$0(ApplicationServiceImpl.java:49)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
    java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
    javafx.graphics@20-ea/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:183)
    java.base/java.lang.Thread.run(Thread.java:1589)
java.lang.NullPointerException: null
    java.base/java.util.Objects.requireNonNull(Objects.java:233)
    HelloApplicationTest.start(HelloApplicationTest.java:28)
    java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    java.base/java.lang.reflect.Method.invoke(Method.java:578)
    org.testfx.framework.junit5.ApplicationExtension$AnnotationBasedApplicationFixture.start(ApplicationExtension.java:158)
    org.testfx.framework.junit5.ApplicationAdapter.start(ApplicationAdapter.java:37)
    org.testfx.toolkit.impl.ApplicationServiceImpl.lambda$start$0(ApplicationServiceImpl.java:49)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
    java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
    javafx.graphics@20-ea/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:183)
    java.base/java.lang.Thread.run(Thread.java:1589)
--- Trace of caller of unhandled exception in Async Thread ---
    java.base/java.lang.Thread.getStackTrace(Thread.java:2550)
    org.testfx.util.WaitForAsyncUtils$ASyncFXCallable.<init>(WaitForAsyncUtils.java:650)
    org.testfx.util.WaitForAsyncUtils.asyncFx(WaitForAsyncUtils.java:258)
    org.testfx.toolkit.impl.ApplicationServiceImpl.start(ApplicationServiceImpl.java:48)
    org.testfx.toolkit.impl.ToolkitServiceImpl.lambda$setupApplication$6(ToolkitServiceImpl.java:127)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    java.base/java.lang.Thread.run(Thread.java:1589)

--- Exception in Async Thread ---
java.util.concurrent.ExecutionException: java.lang.reflect.InvocationTargetException
    java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
    java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
    org.testfx.util.WaitForAsyncUtils$ASyncFXCallable.get(WaitForAsyncUtils.java:697)
    org.testfx.toolkit.impl.ToolkitServiceImpl.lambda$setupApplication$6(ToolkitServiceImpl.java:127)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    java.base/java.lang.Thread.run(Thread.java:1589)
java.lang.reflect.InvocationTargetException: null
    java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:116)
    java.base/java.lang.reflect.Method.invoke(Method.java:578)
    org.testfx.framework.junit5.ApplicationExtension$AnnotationBasedApplicationFixture.start(ApplicationExtension.java:158)
    org.testfx.framework.junit5.ApplicationAdapter.start(ApplicationAdapter.java:37)
    org.testfx.toolkit.impl.ApplicationServiceImpl.lambda$start$0(ApplicationServiceImpl.java:49)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
    java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
    javafx.graphics@20-ea/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:183)
    java.base/java.lang.Thread.run(Thread.java:1589)
java.lang.NullPointerException: null
    java.base/java.util.Objects.requireNonNull(Objects.java:233)
    HelloApplicationTest.start(HelloApplicationTest.java:28)
    java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    java.base/java.lang.reflect.Method.invoke(Method.java:578)
    org.testfx.framework.junit5.ApplicationExtension$AnnotationBasedApplicationFixture.start(ApplicationExtension.java:158)
    org.testfx.framework.junit5.ApplicationAdapter.start(ApplicationAdapter.java:37)
    org.testfx.toolkit.impl.ApplicationServiceImpl.lambda$start$0(ApplicationServiceImpl.java:49)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
    java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
    javafx.graphics@20-ea/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:183)
    java.base/java.lang.Thread.run(Thread.java:1589)
--- Trace of caller of unhandled exception in Async Thread ---
    java.base/java.lang.Thread.getStackTrace(Thread.java:2550)
    org.testfx.util.WaitForAsyncUtils$ASyncFXCallable.<init>(WaitForAsyncUtils.java:650)
    org.testfx.util.WaitForAsyncUtils.async(WaitForAsyncUtils.java:193)
    org.testfx.toolkit.impl.ToolkitServiceImpl.setupApplication(ToolkitServiceImpl.java:123)
    org.testfx.api.FxToolkit.setupApplication(FxToolkit.java:153)
    org.testfx.framework.junit5.ApplicationExtension.beforeEach(ApplicationExtension.java:85)
    org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeEachCallbacks$2(TestMethodTestDescriptor.java:163)
    org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeMethodsOrCallbacksUntilExceptionOccurs$6(TestMethodTestDescriptor.java:199)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeMethodsOrCallbacksUntilExceptionOccurs(TestMethodTestDescriptor.java:199)
    org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeEachCallbacks(TestMethodTestDescriptor.java:162)
    org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:129)
    org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
    org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
    org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
    org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
    org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
    org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
    org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
    org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
    org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
    org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
    org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
    com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
    com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
    com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
    com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
    com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
    com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.reflect.InvocationTargetException

    at org.testfx.util.WaitForAsyncUtils.waitFor(WaitForAsyncUtils.java:302)
    at org.testfx.api.FxToolkit.waitForSetup(FxToolkit.java:245)
    at org.testfx.api.FxToolkit.setupApplication(FxToolkit.java:153)
    at org.testfx.framework.junit5.ApplicationExtension.beforeEach(ApplicationExtension.java:85)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeEachCallbacks$2(TestMethodTestDescriptor.java:163)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeMethodsOrCallbacksUntilExceptionOccurs$6(TestMethodTestDescriptor.java:199)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeMethodsOrCallbacksUntilExceptionOccurs(TestMethodTestDescriptor.java:199)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeEachCallbacks(TestMethodTestDescriptor.java:162)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:129)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
    at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
    at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
    at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
    at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
    at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
    at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: java.util.concurrent.ExecutionException: java.lang.reflect.InvocationTargetException
    at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
    at org.testfx.util.WaitForAsyncUtils$ASyncFXCallable.get(WaitForAsyncUtils.java:697)
    at org.testfx.toolkit.impl.ToolkitServiceImpl.lambda$setupApplication$6(ToolkitServiceImpl.java:127)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1589)
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:116)
    at java.base/java.lang.reflect.Method.invoke(Method.java:578)
    at org.testfx.framework.junit5.ApplicationExtension$AnnotationBasedApplicationFixture.start(ApplicationExtension.java:158)
    at org.testfx.framework.junit5.ApplicationAdapter.start(ApplicationAdapter.java:37)
    at org.testfx.toolkit.impl.ApplicationServiceImpl.lambda$start$0(ApplicationServiceImpl.java:49)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
    at javafx.graphics@20-ea/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:183)
    ... 1 more
Caused by: java.lang.NullPointerException
    at java.base/java.util.Objects.requireNonNull(Objects.java:233)
    at HelloApplicationTest.start(HelloApplicationTest.java:28)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    ... 12 more

```

As if it couldn't find the Home.fxml file. Here is the hierarchy of the project:

I tried to give a different file path, but I can't find it. Instead of getClass().getResource() I tried HelloApplication.class.getResource() but to no avail.

Body:
I'm trying to make tests using TestFX. But when calling this code I get an error.

@ExtendWith(ApplicationExtension.class)
class HelloApplicationTest extends ApplicationTest {
    public double x, y;

    @Start
    @Override
    public void start(Stage stage) throws Exception {
        Parent root = FXMLLoader.load(Objects.requireNonNull(getClass().getResource("fxml/Home.fxml")));
        stage.initStyle(StageStyle.UNDECORATED);

        root.setOnMousePressed(event -> {
            x = stage.getX() - event.getSceneX();
            y = stage.getY() - event.getSceneY();
        });

        root.setOnMouseDragged(event -> {
            stage.setX(event.getSceneX() + x);
            stage.setY(event.getSceneY() + y);
        });

        stage.setScene(new Scene(root, 606, 614));
        stage.show();
    }
}

Error:

--- Exception in Async Thread ---
java.lang.reflect.InvocationTargetException: null
    java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:116)
    java.base/java.lang.reflect.Method.invoke(Method.java:578)
    org.testfx.framework.junit5.ApplicationExtension$AnnotationBasedApplicationFixture.start(ApplicationExtension.java:158)
    org.testfx.framework.junit5.ApplicationAdapter.start(ApplicationAdapter.java:37)
    org.testfx.toolkit.impl.ApplicationServiceImpl.lambda$start$0(ApplicationServiceImpl.java:49)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
    java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
    javafx.graphics@20-ea/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:183)
    java.base/java.lang.Thread.run(Thread.java:1589)
java.lang.NullPointerException: null
    java.base/java.util.Objects.requireNonNull(Objects.java:233)
    HelloApplicationTest.start(HelloApplicationTest.java:28)
    java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    java.base/java.lang.reflect.Method.invoke(Method.java:578)
    org.testfx.framework.junit5.ApplicationExtension$AnnotationBasedApplicationFixture.start(ApplicationExtension.java:158)
    org.testfx.framework.junit5.ApplicationAdapter.start(ApplicationAdapter.java:37)
    org.testfx.toolkit.impl.ApplicationServiceImpl.lambda$start$0(ApplicationServiceImpl.java:49)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
    java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
    javafx.graphics@20-ea/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:183)
    java.base/java.lang.Thread.run(Thread.java:1589)
--- Trace of caller of unhandled exception in Async Thread ---
    java.base/java.lang.Thread.getStackTrace(Thread.java:2550)
    org.testfx.util.WaitForAsyncUtils$ASyncFXCallable.<init>(WaitForAsyncUtils.java:650)
    org.testfx.util.WaitForAsyncUtils.asyncFx(WaitForAsyncUtils.java:258)
    org.testfx.toolkit.impl.ApplicationServiceImpl.start(ApplicationServiceImpl.java:48)
    org.testfx.toolkit.impl.ToolkitServiceImpl.lambda$setupApplication$6(ToolkitServiceImpl.java:127)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    java.base/java.lang.Thread.run(Thread.java:1589)

--- Exception in Async Thread ---
java.util.concurrent.ExecutionException: java.lang.reflect.InvocationTargetException
    java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
    java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
    org.testfx.util.WaitForAsyncUtils$ASyncFXCallable.get(WaitForAsyncUtils.java:697)
    org.testfx.toolkit.impl.ToolkitServiceImpl.lambda$setupApplication$6(ToolkitServiceImpl.java:127)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    java.base/java.lang.Thread.run(Thread.java:1589)
java.lang.reflect.InvocationTargetException: null
    java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:116)
    java.base/java.lang.reflect.Method.invoke(Method.java:578)
    org.testfx.framework.junit5.ApplicationExtension$AnnotationBasedApplicationFixture.start(ApplicationExtension.java:158)
    org.testfx.framework.junit5.ApplicationAdapter.start(ApplicationAdapter.java:37)
    org.testfx.toolkit.impl.ApplicationServiceImpl.lambda$start$0(ApplicationServiceImpl.java:49)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
    java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
    javafx.graphics@20-ea/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:183)
    java.base/java.lang.Thread.run(Thread.java:1589)
java.lang.NullPointerException: null
    java.base/java.util.Objects.requireNonNull(Objects.java:233)
    HelloApplicationTest.start(HelloApplicationTest.java:28)
    java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    java.base/java.lang.reflect.Method.invoke(Method.java:578)
    org.testfx.framework.junit5.ApplicationExtension$AnnotationBasedApplicationFixture.start(ApplicationExtension.java:158)
    org.testfx.framework.junit5.ApplicationAdapter.start(ApplicationAdapter.java:37)
    org.testfx.toolkit.impl.ApplicationServiceImpl.lambda$start$0(ApplicationServiceImpl.java:49)
    java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
    java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
    javafx.graphics@20-ea/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:183)
    java.base/java.lang.Thread.run(Thread.java:1589)
--- Trace of caller of unhandled exception in Async Thread ---
    java.base/java.lang.Thread.getStackTrace(Thread.java:2550)
    org.testfx.util.WaitForAsyncUtils$ASyncFXCallable.<init>(WaitForAsyncUtils.java:650)
    org.testfx.util.WaitForAsyncUtils.async(WaitForAsyncUtils.java:193)
    org.testfx.toolkit.impl.ToolkitServiceImpl.setupApplication(ToolkitServiceImpl.java:123)
    org.testfx.api.FxToolkit.setupApplication(FxToolkit.java:153)
    org.testfx.framework.junit5.ApplicationExtension.beforeEach(ApplicationExtension.java:85)
    org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeEachCallbacks$2(TestMethodTestDescriptor.java:163)
    org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeMethodsOrCallbacksUntilExceptionOccurs$6(TestMethodTestDescriptor.java:199)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeMethodsOrCallbacksUntilExceptionOccurs(TestMethodTestDescriptor.java:199)
    org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeEachCallbacks(TestMethodTestDescriptor.java:162)
    org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:129)
    org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
    org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
    org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
    org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
    org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
    org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
    org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
    org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
    org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
    org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
    org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
    com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
    com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
    com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
    com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
    com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
    com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)

java.lang.RuntimeException: java.util.concurrent.ExecutionException: java.lang.reflect.InvocationTargetException

    at org.testfx.util.WaitForAsyncUtils.waitFor(WaitForAsyncUtils.java:302)
    at org.testfx.api.FxToolkit.waitForSetup(FxToolkit.java:245)
    at org.testfx.api.FxToolkit.setupApplication(FxToolkit.java:153)
    at org.testfx.framework.junit5.ApplicationExtension.beforeEach(ApplicationExtension.java:85)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeEachCallbacks$2(TestMethodTestDescriptor.java:163)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.lambda$invokeBeforeMethodsOrCallbacksUntilExceptionOccurs$6(TestMethodTestDescriptor.java:199)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeMethodsOrCallbacksUntilExceptionOccurs(TestMethodTestDescriptor.java:199)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.invokeBeforeEachCallbacks(TestMethodTestDescriptor.java:162)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:129)
    at org.junit.jupiter.engine.descriptor.TestMethodTestDescriptor.execute(TestMethodTestDescriptor.java:66)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:151)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at java.base/java.util.ArrayList.forEach(ArrayList.java:1511)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.invokeAll(SameThreadHierarchicalTestExecutorService.java:41)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$6(NodeTestTask.java:155)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$8(NodeTestTask.java:141)
    at org.junit.platform.engine.support.hierarchical.Node.around(Node.java:137)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.lambda$executeRecursively$9(NodeTestTask.java:139)
    at org.junit.platform.engine.support.hierarchical.ThrowableCollector.execute(ThrowableCollector.java:73)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.executeRecursively(NodeTestTask.java:138)
    at org.junit.platform.engine.support.hierarchical.NodeTestTask.execute(NodeTestTask.java:95)
    at org.junit.platform.engine.support.hierarchical.SameThreadHierarchicalTestExecutorService.submit(SameThreadHierarchicalTestExecutorService.java:35)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestExecutor.execute(HierarchicalTestExecutor.java:57)
    at org.junit.platform.engine.support.hierarchical.HierarchicalTestEngine.execute(HierarchicalTestEngine.java:54)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:107)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:88)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.lambda$execute$0(EngineExecutionOrchestrator.java:54)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.withInterceptedStreams(EngineExecutionOrchestrator.java:67)
    at org.junit.platform.launcher.core.EngineExecutionOrchestrator.execute(EngineExecutionOrchestrator.java:52)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:114)
    at org.junit.platform.launcher.core.DefaultLauncher.execute(DefaultLauncher.java:86)
    at org.junit.platform.launcher.core.DefaultLauncherSession$DelegatingLauncher.execute(DefaultLauncherSession.java:86)
    at org.junit.platform.launcher.core.SessionPerRequestLauncher.execute(SessionPerRequestLauncher.java:53)
    at com.intellij.junit5.JUnit5IdeaTestRunner.startRunnerWithArgs(JUnit5IdeaTestRunner.java:71)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater$1.execute(IdeaTestRunner.java:38)
    at com.intellij.rt.execution.junit.TestsRepeater.repeat(TestsRepeater.java:11)
    at com.intellij.rt.junit.IdeaTestRunner$Repeater.startRunnerWithArgs(IdeaTestRunner.java:35)
    at com.intellij.rt.junit.JUnitStarter.prepareStreamsAndStart(JUnitStarter.java:235)
    at com.intellij.rt.junit.JUnitStarter.main(JUnitStarter.java:54)
Caused by: java.util.concurrent.ExecutionException: java.lang.reflect.InvocationTargetException
    at java.base/java.util.concurrent.FutureTask.report(FutureTask.java:122)
    at java.base/java.util.concurrent.FutureTask.get(FutureTask.java:191)
    at org.testfx.util.WaitForAsyncUtils$ASyncFXCallable.get(WaitForAsyncUtils.java:697)
    at org.testfx.toolkit.impl.ToolkitServiceImpl.lambda$setupApplication$6(ToolkitServiceImpl.java:127)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at java.base/java.util.concurrent.Executors$RunnableAdapter.call(Executors.java:577)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at java.base/java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1144)
    at java.base/java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:642)
    at java.base/java.lang.Thread.run(Thread.java:1589)
Caused by: java.lang.reflect.InvocationTargetException
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:116)
    at java.base/java.lang.reflect.Method.invoke(Method.java:578)
    at org.testfx.framework.junit5.ApplicationExtension$AnnotationBasedApplicationFixture.start(ApplicationExtension.java:158)
    at org.testfx.framework.junit5.ApplicationAdapter.start(ApplicationAdapter.java:37)
    at org.testfx.toolkit.impl.ApplicationServiceImpl.lambda$start$0(ApplicationServiceImpl.java:49)
    at java.base/java.util.concurrent.FutureTask.run(FutureTask.java:317)
    at javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$10(PlatformImpl.java:456)
    at java.base/java.security.AccessController.doPrivileged(AccessController.java:399)
    at javafx.graphics@20-ea/com.sun.javafx.application.PlatformImpl.lambda$runLater$11(PlatformImpl.java:455)
    at javafx.graphics@20-ea/com.sun.glass.ui.InvokeLaterDispatcher$Future.run(InvokeLaterDispatcher.java:95)
    at javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication._runLoop(Native Method)
    at javafx.graphics@20-ea/com.sun.glass.ui.win.WinApplication.lambda$runLoop$3(WinApplication.java:183)
    ... 1 more
Caused by: java.lang.NullPointerException
    at java.base/java.util.Objects.requireNonNull(Objects.java:233)
    at HelloApplicationTest.start(HelloApplicationTest.java:28)
    at java.base/jdk.internal.reflect.DirectMethodHandleAccessor.invoke(DirectMethodHandleAccessor.java:104)
    ... 12 more

As if it couldn't find the Home.fxml file. Here is the hierarchy of the project:

I tried to give a different file path, but I can't find it. Instead of getClass().getResource() I tried HelloApplication.class.getResource() but to no avail.


问:
Join series of ordered single lines into one single line in Oracle Spatial
Have a series of ordered geometries (lines) of type:

```<code>MDSYS.SDO_GEOMETRY(4402, 4326, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 2, 1), MDSYS.SDO_ORDINATE_ARRAY(-87.5652173103127, 41.6985300456929, 0, 510.1408, -87.5652362658404, 41.6985530209061, 0, 510.14287, -87.5652682628194, 41.6985911197852, 0, 510.14632, ...)
</code>```

Would like to join these into a "single" line of the same type, but with the vertices merged into a single line: i.e. another geometry (line) of type:

```<code>MDSYS.SDO_GEOMETRY(4402, 4326, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 2, 1), MDSYS.SDO_ORDINATE_ARRAY(-87.5652173103127, 41.6985300456929, 0, 510.1408, -87.5652362658404, 41.6985530209061, 0, 510.14287, -87.5652682628194, 41.6985911197852, 0, 510.14632, ...)
</code>```

Tried:

SDO_UTIL.APPEND to incrementally join pair of lines, but this resulted in a "multipart" polyline, not a "single" polyline, i.e.:

```<code>MDSYS.SDO_GEOMETRY(4406, 4326, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 2, 1, 241, 2, 1, 377, 2, 1, 465, 2, 1, 733, 2, 1, 865, 2, 1, 1365, 2, 1), MDSYS.SDO_ORDINATE_ARRAY(-89.7856903197518,...)
</code>```

same issue with SDO_AGGR_LRS_CONCAT

SDO_UTIL.CONCAT_LINES came closest to it, by producing a single line, but it seems some of the vertices SDO_ORDINATE_ARRAY were not correct...

Either there must be another function that does this easily, or perhaps was not using one of the above correctly... or perhaps may have to write a custom function to go into each line's SDO_ORDINATE_ARRAY and join those individually (?).

New to oracle spatial (spatial queries of any type) and documentation out there seem sparse. Any input would be appreciated.

Body:
Have a series of ordered geometries (lines) of type:

MDSYS.SDO_GEOMETRY(4402, 4326, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 2, 1), MDSYS.SDO_ORDINATE_ARRAY(-87.5652173103127, 41.6985300456929, 0, 510.1408, -87.5652362658404, 41.6985530209061, 0, 510.14287, -87.5652682628194, 41.6985911197852, 0, 510.14632, ...)

Would like to join these into a "single" line of the same type, but with the vertices merged into a single line: i.e. another geometry (line) of type:

MDSYS.SDO_GEOMETRY(4402, 4326, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 2, 1), MDSYS.SDO_ORDINATE_ARRAY(-87.5652173103127, 41.6985300456929, 0, 510.1408, -87.5652362658404, 41.6985530209061, 0, 510.14287, -87.5652682628194, 41.6985911197852, 0, 510.14632, ...)

Tried:

SDO_UTIL.APPEND to incrementally join pair of lines, but this resulted in a "multipart" polyline, not a "single" polyline, i.e.:

MDSYS.SDO_GEOMETRY(4406, 4326, NULL, MDSYS.SDO_ELEM_INFO_ARRAY(1, 2, 1, 241, 2, 1, 377, 2, 1, 465, 2, 1, 733, 2, 1, 865, 2, 1, 1365, 2, 1), MDSYS.SDO_ORDINATE_ARRAY(-89.7856903197518,...)

same issue with SDO_AGGR_LRS_CONCAT

SDO_UTIL.CONCAT_LINES came closest to it, by producing a single line, but it seems some of the vertices SDO_ORDINATE_ARRAY were not correct...

Either there must be another function that does this easily, or perhaps was not using one of the above correctly... or perhaps may have to write a custom function to go into each line's SDO_ORDINATE_ARRAY and join those individually (?).

New to oracle spatial (spatial queries of any type) and documentation out there seem sparse. Any input would be appreciated.


问:
SwiftUI and CoreData: Switch between FetchedResults based on user input
Can I have a variable @FetchRequest? I Have two different entities that have some overlapping properties that I show in a subview. I have entityDescription change between based on user input and would like the @FetchRequest to return the correct entity.

If this is not possible, how can I accomplish the desired behavior? Do I need to make a superclass for my two entities: CfTexture and CfColor? I think from a modeling standpoint, it doesn't make sense for them to be subclassed from an abstract entity, but maybe it makes sense functionally to do it this way.

import SwiftUI
import CoreData

struct ScrollGridView: View {

    // Managed object context from environment
    @Environment(\.managedObjectContext) private var viewContext

    // Entity for fetch request
    @State var entityDescription: NSEntityDescription

    // Fetch unlocked CfColor or CfTexture from Core Data
    @FetchRequest(entity: entityDescription,
                  sortDescriptors: [
                    NSSortDescriptor(
                        keyPath: \name,
                        ascending: true)],
                  predicate: NSPredicate(format: "isUnlocked == 1"))

    // What do I put here?
    private var category: FetchedResults<CfColor>
```


问:
Task scheduler runs console app task only for the first time
I created console app in .Net technology. App works fine when I trigger it by click on exe setup (console shows up for about 5-6 min and that's how it should work), so I put it into Task Scheduler(Windows Server 2022) as a Task with settings:

1.General: Administrator, Run only when user is logged on.

2.Triggers: one time at xxx after trigerred repeat every 15 min, enabled.

3.Actions: Start a program with start in optional parameter (where exe file is).

4.Conditions: none checked.

5.Settings: allow on demand, do not start a new instance.

When I run it from windows explorer task runs properly for the first time. On the next start it stops running. Nothing happens. No errors/unusual results in history. Status changes to Running for 2-3 sec and get back to Ready. if I run it again from the explorer level, task runs properly again, but only for the first time.
What I've tried:

1.Change user (system, local service, network service, administrator).

2.Run logged in and not logged in.

3.Highest priviliges on/off.

4.Every kind of trigger time option.

5.With and without optional start in.

6.Different locations(desktop, C:/, other).

7.Run as Admin in .exe properties.

8.Every checkbox on/off in settings.

Anyone faced this issue? Thanks in advance.


问:
Nginx cache content based on data
Imagine you have 2 subdomains that point to single page.

a.example.com -> 1.2.3.4/large_file.mp4

b.example.com -> 1.2.3.4/large_file2.mp4

large_file.mp4 and large_file2.mp4 are same.

I sat up nginx to cache large_file.mp4 and large_file2.mp4 for these 2 domains.

Expection: Is it possible on nginx to when I cached large_file.mp4 on domain a.example.com and another client tried to download large_file2.mp4 on domain b.example.com nginx detect the equality of 2 files and return that from cache or not ?

Title: Nginx cache content based on data


问:
Filter according to a value located in an array inside another array without setting the results in a new array
I'm using the pokeapi api and I want to filter the pokemon according to their types.
The problem is that I don't want to create a new array and I've tried multiple ways but none were working.

Here's the code :

```<code>pokedex.filter((pokedex) => {
    if (type === 'all') {
      return pokedex
    } else {
      return pokedex.types.filter(pt => pt.type.name === type)
    }
  })
</code>```

Basically, I have a dropdown with the default value being "all" and the other options are each types. When you select an option it filters all the pokemon accordinh to the type selected.

Here's where the name of the type is stored in the api :

```<code>types [
  0
    type {
      name //what i need to check
    }
  1
    type {
      name //what i need to check
    }
]
</code>```

I've also tried to use a forEach, a map and to use a includes but it didn't work.
I've logged the array returned after selecting a value but it returns true and false for each pokemon.

How can I use that to filter the pokemon returned ?

Body:
I'm using the pokeapi api and I want to filter the pokemon according to their types.
The problem is that I don't want to create a new array and I've tried multiple ways but none were working.

Here's the code :

pokedex.filter((pokedex) => {
    if (type === 'all') {
      return pokedex
    } else {
      return pokedex.types.filter(pt => pt.type.name === type)
    }
  })

Basically, I have a dropdown with the default value being "all" and the other options are each types. When you select an option it filters all the pokemon accordinh to the type selected.

Here's where the name of the type is stored in the api :

types [
  0
    type {
      name //what i need to check
    }
  1
    type {
      name //what i need to check
    }
]

I've also tried to use a forEach, a map and to use a includes but it didn't work.
I've logged the array returned after selecting a value but it returns true and false for each pokemon.

How can I use that to filter the pokemon returned ?


问:
boost ssl client/server shutdown timing
I have both a boost ssl client and server. Part of my testing is to use the client to send a small test file (~40K) many times to the server, using the pattern socket_connect, async_send, socket_shutdown each time the file is sent. I have noticed on both the client and the server that the ssl_socket.shutdown() call can take upto 10 milliseconds to complete. Is this typical behavior?

The interesting behavior is that the 10 millisecond completion time does not appear until I have executed the connect/send/shutdown pattern about 20 times.

Title: boost ssl client/server shutdown timing


问:
C# POST request response 400 when 200 in Postman
I need to send a POST request with usage of HttpClient, what i have right now:

```<code>    [Route("RegisterTransaction")]
    [HttpPost]
    public async Task<ActionResult<string>> RegisterTransaction()
    {

        var httpClient = this._httpClientFactory.CreateClient();

        try
        {

            string jsonData = "{\"sessionId\":\"1\"," +
                               "\"merchantId\":00000," +
                               "\"amount\":2137," +
                               "\"currency\":\"PLN\"," +
                                "\"crc\":\"xxxxxxxx\"}";
            byte[] byteArray = Encoding.UTF8.GetBytes(jsonData);
            SHA384 shaM = new SHA384Managed();
            var hashResult = shaM.ComputeHash(byteArray);
            string stringHashResult = BitConverter.ToString(hashResult).Replace("-", String.Empty).ToLower();

            using (var client = new HttpClient())
            {
                // Set the base address and headers for the request
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));

                // Set the Basic Authentication header
                var authValue = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{merchantId}:{clientSecret}"));
                client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", authValue);

                var urlReturn = System.Web.HttpUtility.UrlEncode("http://sample.com/");

                var payload =
                    "{" +
                    "\"merchantId\":" + $"{merchantId}" + "," +
                    "\"posId\":" + $"{merchantId}" + "," +
                    "\"sessionId\":" + "\"1\"" + "," +
                    "\"amount\":" + "2137" + "," +
                    "\"currency\":" + "\"PLN\"" + "," +
                    "\"description\":" + "\"test_from_c#\"" + "," +
                    "\"email\":" + "\"sample@gmail.com\"" + "," +
                    "\"country\":" + "\"PL\"" + "," +
                    "\"language\":" + "\"pl\"" + "," +
                    "\"urlReturn\":" + $"\"{urlReturn}\"" + "," +
                    "\"timeLimit\":" + "15" + "," +
                    "\"waitForResult\":" + "true" + "," +
                    "\"shipping\":" + "0" + "," +
                    "\"sign\":" + $"\"{stringHashResult}\"" +
                    "}";

                var content = new StringContent(payload, Encoding.UTF8, "application/json");

                // Send the POST request and get the response
                var response = await client.PostAsync(uriPath, content);
                response.EnsureSuccessStatusCode();
                var responseString = await response.Content.ReadAsStringAsync();

            }

            return Ok();
        }
        catch (HttpRequestException ex)
        {
            return BadRequest(ex.Message);
        }
        catch (Exception ex)
        {
            return BadRequest(ex.Message);
        }

    }
</code>```

Problem is that, this code generates response 400:

```<code>{StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:{  Access-Control-Allow-Origin: *  Strict-Transport-Security: max-age=16000000; includeSubDomains; preload;  Cache-Control: max-age=0, no-cache, no-store  Pragma: no-cache  Date: Sun, 18 Dec 2022 19:52:14 GMT  Connection: close  Set-Cookie: PHPSESSID=20417919ff332939962473ac49ab1f1e; path=/; secure; HttpOnly  Set-Cookie: akaalb_Sandbox=~op=sandbox:sandbox-dc1|~rv=60~m=sandbox-dc1:0|~os=352131486e59fe329be9d171af3005ed~id=903a75e16940cf8c12e4c2e79ee82d78; path=/; HttpOnly; Secure; SameSite=None  DC: DC1  Content-Type: application/json  Content-Length: 40  Expires: Sun, 18 Dec 2022 19:52:14 GMT}, Trailing Headers:{}}
</code>```

with a little to no information usefull to me, while this exact same request sended from Postman is resulting in response 200.

My question is: Why is that?

Why this same payload with these same headers generating different responses? I've checked json payload and it is 100% correct, also generated hashes and username and password in header. What am I missing?

Body:
I need to send a POST request with usage of HttpClient, what i have right now:

    [Route("RegisterTransaction")]
    [HttpPost]
    public async Task<ActionResult<string>> RegisterTransaction()
    {

        var httpClient = this._httpClientFactory.CreateClient();

        try
        {

            string jsonData = "{\"sessionId\":\"1\"," +
                               "\"merchantId\":00000," +
                               "\"amount\":2137," +
                               "\"currency\":\"PLN\"," +
                                "\"crc\":\"xxxxxxxx\"}";
            byte[] byteArray = Encoding.UTF8.GetBytes(jsonData);
            SHA384 shaM = new SHA384Managed();
            var hashResult = shaM.ComputeHash(byteArray);
            string stringHashResult = BitConverter.ToString(hashResult).Replace("-", String.Empty).ToLower();

            using (var client = new HttpClient())
            {
                // Set the base address and headers for the request
                client.DefaultRequestHeaders.Accept.Clear();
                client.DefaultRequestHeaders.Accept.Add(new System.Net.Http.Headers.MediaTypeWithQualityHeaderValue("application/json"));

                // Set the Basic Authentication header
                var authValue = Convert.ToBase64String(Encoding.ASCII.GetBytes($"{merchantId}:{clientSecret}"));
                client.DefaultRequestHeaders.Authorization = new System.Net.Http.Headers.AuthenticationHeaderValue("Basic", authValue);

                var urlReturn = System.Web.HttpUtility.UrlEncode("http://sample.com/");

                var payload =
                    "{" +
                    "\"merchantId\":" + $"{merchantId}" + "," +
                    "\"posId\":" + $"{merchantId}" + "," +
                    "\"sessionId\":" + "\"1\"" + "," +
                    "\"amount\":" + "2137" + "," +
                    "\"currency\":" + "\"PLN\"" + "," +
                    "\"description\":" + "\"test_from_c#\"" + "," +
                    "\"email\":" + "\"sample@gmail.com\"" + "," +
                    "\"country\":" + "\"PL\"" + "," +
                    "\"language\":" + "\"pl\"" + "," +
                    "\"urlReturn\":" + $"\"{urlReturn}\"" + "," +
                    "\"timeLimit\":" + "15" + "," +
                    "\"waitForResult\":" + "true" + "," +
                    "\"shipping\":" + "0" + "," +
                    "\"sign\":" + $"\"{stringHashResult}\"" +
                    "}";

                var content = new StringContent(payload, Encoding.UTF8, "application/json");

                // Send the POST request and get the response
                var response = await client.PostAsync(uriPath, content);
                response.EnsureSuccessStatusCode();
                var responseString = await response.Content.ReadAsStringAsync();

            }

            return Ok();
        }
        catch (HttpRequestException ex)
        {
            return BadRequest(ex.Message);
        }
        catch (Exception ex)
        {
            return BadRequest(ex.Message);
        }

    }

Problem is that, this code generates response 400:

{StatusCode: 400, ReasonPhrase: 'Bad Request', Version: 1.1, Content: System.Net.Http.HttpConnectionResponseContent, Headers:{  Access-Control-Allow-Origin: *  Strict-Transport-Security: max-age=16000000; includeSubDomains; preload;  Cache-Control: max-age=0, no-cache, no-store  Pragma: no-cache  Date: Sun, 18 Dec 2022 19:52:14 GMT  Connection: close  Set-Cookie: PHPSESSID=20417919ff332939962473ac49ab1f1e; path=/; secure; HttpOnly  Set-Cookie: akaalb_Sandbox=~op=sandbox:sandbox-dc1|~rv=60~m=sandbox-dc1:0|~os=352131486e59fe329be9d171af3005ed~id=903a75e16940cf8c12e4c2e79ee82d78; path=/; HttpOnly; Secure; SameSite=None  DC: DC1  Content-Type: application/json  Content-Length: 40  Expires: Sun, 18 Dec 2022 19:52:14 GMT}, Trailing Headers:{}}

with a little to no information usefull to me, while this exact same request sended from Postman is resulting in response 200.

My question is: Why is that?

Why this same payload with these same headers generating different responses? I've checked json payload and it is 100% correct, also generated hashes and username and password in header. What am I missing?


问:
Keras Custom Loss Function
I have a function which calculates the cumulative stock level via y_preds. Then I match the stock level with the y_true values to determine whether the demands are met. It's for RNN-LSTM models. Lets say;

for a batch size of 4:

y_true= np.array(1,2,3,4)

y_pred= np.array(2,3,0,1)

stock levels begins as 0 and it cannot be negative values.

term_begin_stock_level = 2, 4, 2, 1 (for first value=y_pred[0], term_end_stock_level + y_pred)

term_end_stock_level = 1,2,0,0 (term_begin_stock_level - y_pred if == 0, it is 0)

missed_sales = 0, 0, 1, 3

service level = (sum(y_true) - sum(missed_sales)) / sum(y_true)

So the customized loss function which I coded is below:

import tensorflow as tf

def custom_loss(y_true, y_pred):
    shape = y_pred.shape
    length = shape[0]

    # Create arrays for the stock levels
    tb_stock = tf.zeros(shape=length)
    te_stock = tf.zeros(shape=length)
    missed_sales = tf.zeros(shape=length)

    # Compute the stock levels and missed sales
    for i in range(length):
       tb_stock[i] = te_stock[i - 1] + y_pred[i]
       te_stock[i] = tb_stock[i] - y_true[i]
        if tb_stock[i] < 0:
           tb_stock[i] = 0
        if te_stock[i] < 0:
            te_stock[i] = 0
        if tb_stock[i] - y_true[i] < 0:
            missed_sales[i] = tf.abs(tb_stock[i] - y_true[i])

    # Compute the average stock cost and service level
    avg_stock = tf.reduce_mean(te_stok)
    service_level = (tf.reduce_sum(y_true) - tf.reduce_sum(missed_sales)) / tf.reduce_sum(y_true)
    loss=service_level/avg_stock*(-1)

    return loss
```

I am not sure about the object types and the sizes of the y_true and y_pred in loss function. So I am also not sure about how to loop them and save values into the tb and te stocks variables in order to calculate average stock value for a batch size. Would you show me a similar example about this?
Thanks in advance...

Title: Keras Custom Loss Function

Body:
I have a function which calculates the cumulative stock level via y_preds. Then I match the stock level with the y_true values to determine whether the demands are met. It's for RNN-LSTM models. Lets say;

for a batch size of 4:

y_true= np.array(1,2,3,4)

y_pred= np.array(2,3,0,1)

stock levels begins as 0 and it cannot be negative values.

term_begin_stock_level = 2, 4, 2, 1 (for first value=y_pred[0], term_end_stock_level + y_pred)

term_end_stock_level = 1,2,0,0 (term_begin_stock_level - y_pred if == 0, it is 0)

missed_sales = 0, 0, 1, 3

service level = (sum(y_true) - sum(missed_sales)) / sum(y_true)

So the customized loss function which I coded is below:

import tensorflow as tf

def custom_loss(y_true, y_pred):
    shape = y_pred.shape
    length = shape[0]

    # Create arrays for the stock levels
    tb_stock = tf.zeros(shape=length)
    te_stock = tf.zeros(shape=length)
    missed_sales = tf.zeros(shape=length)

    # Compute the stock levels and missed sales
    for i in range(length):
       tb_stock[i] = te_stock[i - 1] + y_pred[i]
       te_stock[i] = tb_stock[i] - y_true[i]
        if tb_stock[i] < 0:
           tb_stock[i] = 0
        if te_stock[i] < 0:
            te_stock[i] = 0
        if tb_stock[i] - y_true[i] < 0:
            missed_sales[i] = tf.abs(tb_stock[i] - y_true[i])

    # Compute the average stock cost and service level
    avg_stock = tf.reduce_mean(te_stok)
    service_level = (tf.reduce_sum(y_true) - tf.reduce_sum(missed_sales)) / tf.reduce_sum(y_true)
    loss=service_level/avg_stock*(-1)

    return loss

I am not sure about the object types and the sizes of the y_true and y_pred in loss function. So I am also not sure about how to loop them and save values into the tb and te stocks variables in order to calculate average stock value for a batch size. Would you show me a similar example about this?
Thanks in advance...


问:
how to run a Python project repository properly using Jupyter Notebook?
As a terrible rookie, I'm trying to run code from this repository https://github.com/wtomin/SteerablePyramid_Torch_TF_Numpy

Since terminal is not very user friendly, I thought Anaconda+Jupyter Notebooks would be the most easy to use approach for me. I followed the installation instructions given in the repository readme in a new Jupyter notebook. And now I'm simply trying to run some code from the project but getting "not found" errors:

When I go the examples folder and try !python example_tf.py, it gives the following error:

FileNotFoundError: Image file not found on disk: ./assets/patagonia.jpg

but the directory and the file actually exist

Instead when I try to copy and run the code within example_tf.py, it finds error in line from steerable.SCFpyr_TF import SCFpyr_TF by outputting the following

ModuleNotFoundError: No module named 'steerable'

but SCFpyr_TF.py exists under the folder steerable

No idea why the files are not found after I did the installation as instructed. Why can't the Jupyter notebook see those other files in other relevant directories of the project?

I must be doing some horrible rookie mistakes. Can someone please give a step-by-step instructions of running a python project downloaded from a github repository properly using a Jupyter Notebook?


问:
pytesseract - image_to_boxes doesn't work, No such file or directory: 'C:\\Users\\...~1\\AppData\\Local\\Temp\\tess_axo50sw5.box'
Hello I am triying to use tesseract with anaconda, I set a new env with the following lines:

```<code>!conda create --name tesseract
!conda activate tesseract
!conda install -c conda-forge ipykernel tesseract pytesseract Pillow numpy python-opencv -y
</code>```

And I am using the following code:

```<code>from PIL import Image
import cv2
import pytesseract
from numpy import ndarray

pytesseract.pytesseract.tesseract_cmd = r'C:\anaconda3\envs\tesseract\Library\bin\tesseract.exe'

def get_text(img: ndarray) -> str:
    text = pytesseract.image_to_string(img)
    return text

IMAGE_PATH = 'a.jpg'

img = Image.open(IMAGE_PATH)

get_text(img) # this work perfect
</code>```

but when I try to execute this

```<code>pytesseract.image_to_boxes(img)
</code>```

I get the following error:

No such file or directory:
'C:\Users\...~1\AppData\Local\Temp\tess_axo50sw5.box'

I am using anaconda, on windows 10.

Why works get_text but not image_to_boxes?

Is correctly setted al the env?

How can I solve this?

Thanks

Body:
Hello I am triying to use tesseract with anaconda, I set a new env with the following lines:

!conda create --name tesseract
!conda activate tesseract
!conda install -c conda-forge ipykernel tesseract pytesseract Pillow numpy python-opencv -y

And I am using the following code:

from PIL import Image
import cv2
import pytesseract
from numpy import ndarray

pytesseract.pytesseract.tesseract_cmd = r'C:\anaconda3\envs\tesseract\Library\bin\tesseract.exe'

def get_text(img: ndarray) -> str:
    text = pytesseract.image_to_string(img)
    return text

IMAGE_PATH = 'a.jpg'

img = Image.open(IMAGE_PATH)

get_text(img) # this work perfect

but when I try to execute this

pytesseract.image_to_boxes(img)

I get the following error:

No such file or directory:
'C:\Users\...~1\AppData\Local\Temp\tess_axo50sw5.box'

I am using anaconda, on windows 10.

Why works get_text but not image_to_boxes?

Is correctly setted al the env?

How can I solve this?

Thanks


问:
How to plot time-indexed data on top of a musical stave?
Is there any smart way (ie, not completely manual) to plot time-indexed data on top of a musical stave?
If I have a isometric stave, that stave has a implied time scale:

I want to plot some time-indexed analysis, let's say the waveform and spectrogram in reference to this implied timescale.

I tried with matplotlib.imshow but there's lack of real control on the scale and display of the background, and is not easy to use that background as a scale.
The best I got to was by a lot of manual editing, but I'd like something automated for large-scale analysis.
Does anyone know of any solution to this?


问:
Reactjs Homepage.js is working but the contents is not appearing when running the code?
I tried removing everything in the HomePage.js and still nothing would display. I believe the problem lays between either index.html or app.js.

App.js

```<code>import './App.css'
import { BrowserRouter, Routes, Route } from 'react-router-dom'

import HomePage from './components/HomePage'

function App() {
  return (
    <div className="App">
      <BrowserRouter>
        <Routes>
          <Route path="/" element={<HomePage />}></Route>
        </Routes>
      </BrowserRouter>
    </div>
  )
}

export default App
</code>```

inspect element in homepage

I tried changing everything in homepage.js and homepage.css. Still no luck even tried re typing the import in App.js etc..

Body:
I tried removing everything in the HomePage.js and still nothing would display. I believe the problem lays between either index.html or app.js.

App.js

import './App.css'
import { BrowserRouter, Routes, Route } from 'react-router-dom'

import HomePage from './components/HomePage'

function App() {
  return (

      <BrowserRouter>
        <Routes>
          <Route path="/" element={<HomePage />}></Route>
        </Routes>
      </BrowserRouter>

  )
}

export default App

inspect element in homepage

I tried changing everything in homepage.js and homepage.css. Still no luck even tried re typing the import in App.js etc..


问:
CSS file in ASP.NET, how to connect the css file in Content to the View MVC
I want to connect the css file in Content to a particular MVC view file.

In the MVC view file, I added a link element with every attributes, stylesheet, rel and href