msf4-0/Integrated-Vision-Inspection-System-IVIS

"No tables found" error at "Creating Database Configuration" page

Opened this issue · 0 comments

Describe the bug
This bug happens from a fresh installation of IVIS app using native Windows installation method. This bug causes user to be unable to proceed from the "Creating Database Configuration" page in IVIS app. I've checked that the details submitted in this page are all correct, and also can see the "Successfully connected to database postgres" message appears after clicking on the submit button, but nothing happens afterward.

To Reproduce
Steps to reproduce the behavior:

  1. Perform a fresh installation on IVIS using native Windows installation method.
  2. The PC is updated with the most recent Windows update.
  3. Most software are installed recently, mainly the relevant one:
  • Microsoft Visual Studio 2022
  • Postgres version 16
  1. All the IVIS python packages are installed in a new Anaconda environment.
  2. After following the installation steps, and launching IVIS for the first time, IVIS prompt an error indicating a missing package: html5lib
  3. Closed IVIS app to pip install html5lib.
  4. Launch IVIS app again, filled in the details in "Creating Database Configuration" page.

Expected behavior
After clicking on the submit button after filling in the correct details in "Creating Database Configuration" page, nothing happen. The app unable to proceed from this point onward

IVIS Log (error log at the last few lines)

[INFO] Logging console outputs to C:\Users\suhaimi\vision_system_logs\logs_2023-11-23_17-25-52_775711.txt
2023-11-23 17:25:53.070860: I tensorflow/core/platform/cpu_feature_guard.cc:151] This TensorFlow binary is optimized with oneAPI Deep Neural Network Library (oneDNN) to use the following CPU instructions in performance-critical operations:  AVX AVX2
To enable them in other operations, rebuild TensorFlow with the appropriate compiler flags.
2023-11-23 17:25:53.579754: I tensorflow/core/common_runtime/gpu/gpu_device.cc:1525] Created device /job:localhost/replica:0/task:0/device:GPU:0 with 2783 MB memory:  -> device: 0, name: Quadro P620, pci bus id: 0000:01:00.0, compute capability: 6.1
[INFO] 23-Nov-23 17:25:53 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[INFO] 23-Nov-23 17:26:01 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[DEBUG] 23-Nov-23 17:26:01 - [database_setup.check_if_field_empty: 87] []
[INFO] 23-Nov-23 17:26:01 - [database_setup.test_database_connection: 103] Successfully connected to Database postgres
[INFO] 23-Nov-23 17:26:02 - [database_manager.check_if_database_exist: 284] Database integrated_vision_inspection_system exists
[INFO] 23-Nov-23 17:26:02 - [database_manager.initialise_database_pipeline: 1050] Database 'integrated_vision_inspection_system' already exists
PostgreSQL database version: PostgreSQL 11.22, compiled by Visual C++ build 1914, 64-bit
PostgreSQL connection status: 0
You are connected to database 'integrated_vision_inspection_system' as user 'postgres' on host 'localhost' at port '5432'.
[INFO] 23-Nov-23 17:26:02 - [database_manager.check_if_table_exist: 303] Table project exists
[INFO] 23-Nov-23 17:26:02 - [database_manager.initialise_database_pipeline: 1064] Tables already exist in database 'integrated_vision_inspection_system'
[INFO] 23-Nov-23 17:26:02 - [database_manager.initialise_database_pipeline: 1069] Scraping all details of pretrained models
[INFO] 23-Nov-23 17:26:02 - [model_details_db_setup.scrape_tfod_data: 226] Scraping TensorFlow Models information
[ERROR] 23-Nov-23 17:26:03 - [database_manager.initialise_database_pipeline: 1076] No tables found
[ERROR] 23-Nov-23 17:26:03 - [database_setup.modify_secrets_toml: 132] There were some error creating the database config or connecting to database
[INFO] 23-Nov-23 17:26:03 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[INFO] 23-Nov-23 17:29:14 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[DEBUG] 23-Nov-23 17:29:14 - [database_setup.check_if_field_empty: 87] []
[INFO] 23-Nov-23 17:29:14 - [database_setup.test_database_connection: 103] Successfully connected to Database postgres
[INFO] 23-Nov-23 17:29:15 - [database_manager.check_if_database_exist: 284] Database integrated_vision_inspection_system exists
[INFO] 23-Nov-23 17:29:15 - [database_manager.initialise_database_pipeline: 1050] Database 'integrated_vision_inspection_system' already exists
PostgreSQL database version: PostgreSQL 11.22, compiled by Visual C++ build 1914, 64-bit
PostgreSQL connection status: 0
You are connected to database 'integrated_vision_inspection_system' as user 'postgres' on host 'localhost' at port '5432'.
[INFO] 23-Nov-23 17:29:15 - [database_manager.check_if_table_exist: 303] Table project exists
[INFO] 23-Nov-23 17:29:15 - [database_manager.initialise_database_pipeline: 1064] Tables already exist in database 'integrated_vision_inspection_system'
[INFO] 23-Nov-23 17:29:15 - [database_manager.initialise_database_pipeline: 1069] Scraping all details of pretrained models
[INFO] 23-Nov-23 17:29:15 - [model_details_db_setup.scrape_tfod_data: 226] Scraping TensorFlow Models information
[ERROR] 23-Nov-23 17:29:16 - [database_manager.initialise_database_pipeline: 1076] No tables found
[ERROR] 23-Nov-23 17:29:16 - [database_setup.modify_secrets_toml: 132] There were some error creating the database config or connecting to database
[INFO] 23-Nov-23 17:29:16 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[INFO] 23-Nov-23 17:29:18 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[DEBUG] 23-Nov-23 17:29:18 - [database_setup.check_if_field_empty: 87] []
[INFO] 23-Nov-23 17:29:18 - [database_setup.test_database_connection: 103] Successfully connected to Database postgres
[INFO] 23-Nov-23 17:29:19 - [database_manager.check_if_database_exist: 284] Database integrated_vision_inspection_system exists
[INFO] 23-Nov-23 17:29:19 - [database_manager.initialise_database_pipeline: 1050] Database 'integrated_vision_inspection_system' already exists
PostgreSQL database version: PostgreSQL 11.22, compiled by Visual C++ build 1914, 64-bit
PostgreSQL connection status: 0
You are connected to database 'integrated_vision_inspection_system' as user 'postgres' on host 'localhost' at port '5432'.
[INFO] 23-Nov-23 17:29:19 - [database_manager.check_if_table_exist: 303] Table project exists
[INFO] 23-Nov-23 17:29:19 - [database_manager.initialise_database_pipeline: 1064] Tables already exist in database 'integrated_vision_inspection_system'
[INFO] 23-Nov-23 17:29:19 - [database_manager.initialise_database_pipeline: 1069] Scraping all details of pretrained models
[INFO] 23-Nov-23 17:29:19 - [model_details_db_setup.scrape_tfod_data: 226] Scraping TensorFlow Models information
[ERROR] 23-Nov-23 17:29:19 - [database_manager.initialise_database_pipeline: 1076] No tables found
[ERROR] 23-Nov-23 17:29:19 - [database_setup.modify_secrets_toml: 132] There were some error creating the database config or connecting to database
[INFO] 23-Nov-23 17:29:20 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[INFO] 23-Nov-23 17:29:21 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[DEBUG] 23-Nov-23 17:29:21 - [database_setup.check_if_field_empty: 87] []
[INFO] 23-Nov-23 17:29:22 - [database_setup.test_database_connection: 103] Successfully connected to Database postgres
[INFO] 23-Nov-23 17:29:22 - [database_manager.check_if_database_exist: 284] Database integrated_vision_inspection_system exists
[INFO] 23-Nov-23 17:29:22 - [database_manager.initialise_database_pipeline: 1050] Database 'integrated_vision_inspection_system' already exists
PostgreSQL database version: PostgreSQL 11.22, compiled by Visual C++ build 1914, 64-bit
PostgreSQL connection status: 0
You are connected to database 'integrated_vision_inspection_system' as user 'postgres' on host 'localhost' at port '5432'.
[INFO] 23-Nov-23 17:29:22 - [database_manager.check_if_table_exist: 303] Table project exists
[INFO] 23-Nov-23 17:29:22 - [database_manager.initialise_database_pipeline: 1064] Tables already exist in database 'integrated_vision_inspection_system'
[INFO] 23-Nov-23 17:29:22 - [database_manager.initialise_database_pipeline: 1069] Scraping all details of pretrained models
[INFO] 23-Nov-23 17:29:22 - [model_details_db_setup.scrape_tfod_data: 226] Scraping TensorFlow Models information
[ERROR] 23-Nov-23 17:29:23 - [database_manager.initialise_database_pipeline: 1076] No tables found
[ERROR] 23-Nov-23 17:29:23 - [database_setup.modify_secrets_toml: 132] There were some error creating the database config or connecting to database
[INFO] 23-Nov-23 17:29:23 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[INFO] 23-Nov-23 17:30:15 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs
[DEBUG] 23-Nov-23 17:30:15 - [database_setup.check_if_field_empty: 87] []
[INFO] 23-Nov-23 17:30:16 - [database_setup.test_database_connection: 103] Successfully connected to Database postgres
[INFO] 23-Nov-23 17:30:16 - [database_manager.check_if_database_exist: 284] Database integrated_vision_inspection_system exists
[INFO] 23-Nov-23 17:30:16 - [database_manager.initialise_database_pipeline: 1050] Database 'integrated_vision_inspection_system' already exists
PostgreSQL database version: PostgreSQL 11.22, compiled by Visual C++ build 1914, 64-bit
PostgreSQL connection status: 0
You are connected to database 'integrated_vision_inspection_system' as user 'postgres' on host 'localhost' at port '5432'.
[INFO] 23-Nov-23 17:30:16 - [database_manager.check_if_table_exist: 303] Table project exists
[INFO] 23-Nov-23 17:30:16 - [database_manager.initialise_database_pipeline: 1064] Tables already exist in database 'integrated_vision_inspection_system'
[INFO] 23-Nov-23 17:30:16 - [database_manager.initialise_database_pipeline: 1069] Scraping all details of pretrained models
[INFO] 23-Nov-23 17:30:16 - [model_details_db_setup.scrape_tfod_data: 226] Scraping TensorFlow Models information
[ERROR] 23-Nov-23 17:30:18 - [database_manager.initialise_database_pipeline: 1076] No tables found
[ERROR] 23-Nov-23 17:30:18 - [database_setup.modify_secrets_toml: 132] There were some error creating the database config or connecting to database
[INFO] 23-Nov-23 17:30:18 - [app.setup: 50] 1 Physical GPUs, 1 Logical GPUs

Bypass
There is a bypass method for this, as I've noticed that IVIS unable to proceed because it does not generate the secrets.toml file. So to bypass this, I've manually created the secrets.toml and place in the .streamlit folder within the IVIS file directory. With the presence of the secrets.toml file, IVIS will skip this "Creating Database Configuration" page and proceed to the main login page.

At this point, I can use the UI of the page, but also encountered some other errors in other pages of the app. I suspect those errors are the consequences of this bypass.