Front end not working at port 8000
lisawebcoder opened this issue · 24 comments
PGSync version:
Postgres version:
Elasticsearch version:
Redis version:
Python version:
Problem Description:
Hello how exactly do you get the localhost:8000 to work?
Do we need to add a container in docker compose?
Error Message (if any):
Hello how exactly do you get the localhost:8000 to work?
Do we need to add a container in docker compose?
hello does anyone here answer ? just wanted to know thxz lisa---so what i mean is the demo folder that has the index and runserver files but when i open local host port 8000 the index search page doesnt appear
Hello does anyone actually respond to the questions posted here?
Hi, Sorry about the late response. Elasticsearch runs on default port 9300 and not 8000.
If you want to run on a different port you will need to modify the docker-compose to and map 9301 to 8000
Hello thank you for the reply
No i am talking about your demo folder
It has the index html and runserver.sh file it runs at port 8000 but it doesn't work---'
Pretty sure we have to add to compose file?
But whats is exactly the configuration----i just tried running the runserver file in a cli and i get adev not found---
Good question. That runs in under virtualenv and not docker.
You can create a virtual env
and simply run:
cd demo
-pip install requirements.txt
./runserver.sh
Hello ok i will trythis thxz
i was able to install requirements.tx but i get an error when i run ./runserver.sh
Main@Main-PC MINGW64 ~/desktop/internship/roberto_sync_july/demo (roberto_sync_postgres_elasticsearch_V1)
$ ./runserver.sh
Traceback (most recent call last):
File "C:\Users\Main\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Main\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\Main\desktop\internship\roberto_sync_july\demo\venv\Scripts\adev.exe_main.py", line 7, in
File "C:\Users\Main\desktop\internship\roberto_sync_july\demo\venv\lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "C:\Users\Main\desktop\internship\roberto_sync_july\demo\venv\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\Main\desktop\internship\roberto_sync_july\demo\venv\lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Main\desktop\internship\roberto_sync_july\demo\venv\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Main\desktop\internship\roberto_sync_july\demo\venv\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, kwargs)
File "C:\Users\Main\desktop\internship\roberto_sync_july\demo\venv\lib\site-packages\aiohttp_devtools\cli.py", line 99, in runserver
run_app(runserver(**active_config))
File "C:\Users\Main\desktop\internship\roberto_sync_july\demo\venv\lib\site-packages\aiohttp_devtools\runserver\main.py", line 40, in runserver
config.import_app_factory()
File "C:\Users\Main\desktop\internship\roberto_sync_july\demo\venv\lib\site-packages\aiohttp_devtools\runserver\config.py", line 140, in import_app_factory
module = import_module(module_path)
File "C:\Users\Main\AppData\Local\Programs\Python\Python39\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in call_with_frames_removed
File "C:\Users\Main\Desktop\internship\roberto_sync_july\demo\server.py", line 3, in
from app.main import create_app
File "C:\Users\Main\Desktop\internship\roberto_sync_july\demo\app\main.py", line 4, in
from app import settings
File "C:\Users\Main\Desktop\internship\roberto_sync_july\demo\app\settings.py", line 10, in
ELASTICSEARCH_URL = env.str("ELASTICSEARCH_URL")
File "C:\Users\Main\desktop\internship\roberto_sync_july\demo\venv\lib\site-packages\environs_init.py", line 116, in method
raise EnvError('Environment variable "{}" not set'.format(proxied_key or parsed_key))
environs.EnvError: Environment variable "ELASTICSEARCH_URL" not set
(venv)
Main@Main-PC MINGW64 ~/desktop/internship/roberto_sync_july/demo (roberto_sync_postgres_elasticsearch_V1)
--update--ok my error i need to run docker compose 1st to run the other contasiners 1st--
hello i am stil getting this error in spite i have the containers running and they sync--gpt gives me confsuing suggestins so do you kno how to resolve this? ok thxz --
$ ./runserver.sh
Traceback (most recent call last):
File "C:\Users\Roberto\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Roberto\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\Roberto\Desktop\4thSemester\InterShip\PostInternship\July2023\june29th2023\pgsync-mainJune29th23at10amWORKS\pgsync-main\demo\venv\Scripts\adev.exe_main.py", line 7, in
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\click\core.py", line 1157, in call
return self.main(*args, **kwargs)
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\click\core.py", line 783, in invoke
return __callback(*args, kwargs)
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\aiohttp_devtools\cli.py", line 99, in runserver
run_app(runserver(**active_config))
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\aiohttp_devtools\runserver\main.py", line 40, in runserver
config.import_app_factory()
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\aiohttp_devtools\runserver\config.py", line 140, in import_app_factory
module = import_module(module_path)
File "C:\Users\Roberto\AppData\Local\Programs\Python\Python39\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in call_with_frames_removed
File "C:\Users\Roberto\Desktop\4thSemester\InterShip\PostInternship\July2023\june29th2023\pgsync-mainJune29th23at10amWORKS\pgsync-main\demo\server.py", line 3, in
from app.main import create_app
File "C:\Users\Roberto\Desktop\4thSemester\InterShip\PostInternship\July2023\june29th2023\pgsync-mainJune29th23at10amWORKS\pgsync-main\demo\app\main.py", line 4, in
from app import settings
File "C:\Users\Roberto\Desktop\4thSemester\InterShip\PostInternship\July2023\june29th2023\pgsync-mainJune29th23at10amWORKS\pgsync-main\demo\app\settings.py", line 10, in
ELASTICSEARCH_URL = env.str("ELASTICSEARCH_URL")
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\environs_init.py", line 116, in method
raise EnvError('Environment variable "{}" not set'.format(proxied_key or parsed_key))
environs.EnvError: Environment variable "ELASTICSEARCH_URL" not set
You need to set ELASTICSEARCH_URL in your env
e.g export ELASTICSEARCH_URL=localhost:9300
hello w/ gpt i tried set or setx and i wasnt trying export but i tried export and it shows he port but now i have a new error--
environs.EnvError: Environment variable "ELASTICSEARCH_INDEX" not set--update--i will set it to the index name i have in the schema.json in examples folder and see what happens --ok thxz--
$ ./runserver.sh
Traceback (most recent call last):
File "C:\Users\Roberto\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 197, in _run_module_as_main
return _run_code(code, main_globals, None,
File "C:\Users\Roberto\AppData\Local\Programs\Python\Python39\lib\runpy.py", line 87, in run_code
exec(code, run_globals)
File "C:\Users\Roberto\Desktop\4thSemester\InterShip\PostInternship\July2023\june29th2023\pgsync-mainJune29th23at10amWORKS\pgsync-main\demo\venv\Scripts\adev.exe_main.py", line 7, in
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\click\core.py", line 1157, in call
return self.main(args, **kwargs)
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\click\core.py", line 1078, in main
rv = self.invoke(ctx)
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\click\core.py", line 1688, in invoke
return _process_result(sub_ctx.command.invoke(sub_ctx))
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\click\core.py", line 1434, in invoke
return ctx.invoke(self.callback, **ctx.params)
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\click\core.py", line 783, in invoke
return __callback(args, kwargs)
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\aiohttp_devtools\cli.py", line 99, in runserver
run_app(runserver(**active_config))
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\aiohttp_devtools\runserver\main.py", line 40, in runserver
config.import_app_factory()
File "C:\Users\Roberto\desktop\4thsemester\intership\postinternship\july2023\june29th2023\pgsync-mainjune29th23at10amworks\pgsync-main\demo\venv\lib\site-packages\aiohttp_devtools\runserver\config.py", line 140, in import_app_factory
module = import_module(module_path)
File "C:\Users\Roberto\AppData\Local\Programs\Python\Python39\lib\importlib_init.py", line 127, in import_module
return _bootstrap._gcd_import(name[level:], package, level)
File "", line 1030, in _gcd_import
File "", line 1007, in _find_and_load
File "", line 986, in _find_and_load_unlocked
File "", line 680, in _load_unlocked
File "", line 790, in exec_module
File "", line 228, in _call_with_frames_removed
File "C:\Users\Roberto\Desktop\4thSemester\InterShip\PostInternship\July2023\june29th2023\pgsync-mainJune29th23at10amWORKS\pgsync-main\demo\server.py", line 3, in
from app.main import create_app
File "C:\Users\Roberto\Desktop\4thSemester\InterShip\PostInternship\July2023\june29th2023\pgsync-mainJune29th23at10amWORKS\pgsync-main\demo\app\main.py", line 5, in
from app.views import TypeAheadView
File "C:\Users\Roberto\Desktop\4thSemester\InterShip\PostInternship\July2023\june29th2023\pgsync-mainJune29th23at10amWORKS\pgsync-main\demo\app\views.py", line 12, in
from elasticsearch import Elasticsearch
ModuleNotFoundError: No module named 'elasticsearch'
(venv)
--hello i set the ur;l and the index but i now have the above error--i will try to ask gpt unles you know --ok thxz--
update i had to add some other libs and do the servers starts but not the index search box html page--
sync_postgres_elasticsearch_V1)
$ ./runserver.sh
[13:45:31] Starting aux server at http://localhost:8001 \u25c6
[13:45:31] Starting dev server at http://localhost:8000 \u25cf
[13:45:37] \u25c6 GET / 404 172B
[13:45:38] \u25c6 GET /favicon.ico 404 172B
[13:46:11] \u25cf GET / 200 183B 0ms
details: {
'request_duration_ms': 0.0,
'request_headers': {
'Host': 'localhost:8000',
'Connection': 'keep-alive',
'sec-ch-ua': '"Not/A)Brand";v="99", "Microsoft Edge";v="115", "Chromium";v="115"',
'sec-ch-ua-mobile': '?0',
'User-Agent': (
'Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/'
'537.36 Edg/115.0.1901.183'
),
'sec-ch-ua-platform': '"Windows"',
'Accept': 'image/webp,image/apng,image/svg+xml,image/,/*;q=0.8',
'Sec-Fetch-Site': 'same-origin',
'Sec-Fetch-Mode': 'no-cors',
'Sec-Fetch-Dest': 'image',
'Referer': 'http://localhost:8000/',
'Accept-Encoding': 'gzip, deflate, br',
'Accept-Language': 'en-US,en;q=0.9,fr;q=0.8',
},
'request_body': None,
'request_size': '',
'response_headers': {
'Content-Type': 'text/plain; charset=utf-8',
'Content-Length': '14',
'Date': 'Sat, 22 Jul 2023 17:46:11 GMT',
'Server': 'Python/3.9 aiohttp/3.8.5',
},
'response_body': '404: Not Found',
}
[13:46:11] \u25cf GET /favicon.ico 404 172B 0ms
======== Running on http://0.0.0.0:8001 ========
(Press CTRL+C to quit)
Sorry about that. That demoe seems to be missing a few things. can you also install the
pip install elasticsearch==7.13.4
pip install elasticsearch-dsl==7.4.1
hello yes gpt had me install these but i still dont get the index.html page and this what gpt told me but not sure i get it--
I apologize for the confusion. Let's try to narrow down the issue and go through specific steps to troubleshoot it:
-
Ensure that the
index.html
file is named correctly and placed in the same directory as therunserver.sh
script. -
Double-check that the content of
index.html
contains the expected search box and is correctly formatted. -
Confirm that the server is properly configured to serve static files, including the
index.html
file.
To verify the server configuration, we need to inspect the application code and the server configuration files. Specifically, we should look for:
- How static files are served in the application (e.g., using a specific URL prefix like
/static/
, or if there's a designated endpoint to serve static files). - The route or view function that handles requests for
/
and responds with the content ofindex.html
. - The settings or configurations related to static files and template rendering.
Since I don't have access to your application's code and configuration files, I can only provide general guidance. Please follow these steps:
-
Check the application's codebase for the route or view function that handles the root URL
/
. Make sure it returns theindex.html
file. -
Ensure that the application's web server or framework is configured to serve static files from the appropriate directory (usually named
static
orpublic
). -
If you are using a specific framework, consult its documentation on how to properly serve static files and handle routes.
-
Verify that the server is running on the correct port. If you are using a custom port, make sure to access the application using the correct port number in the URL.
If you encounter specific error messages or logs related to the index.html
file or the server's configuration, please share them so that I can provide more targeted assistance.
Again, I apologize for any confusion, and I'm here to help you resolve the issue step by step.
hello also i want to mention in the examples/runserver.sh file i chamged the cd ./demo to cd ../demo cuz they ar eno in the same dir
could this be why i get only a [] in the port 8000/ but i dont htink so gpt said its corect cd ../ but anyway not sure why i dont get the search box at port 8000just a an empty arry sigh []
Hello my container don't build anymore
I did compose build and i get marshmallows error
So i dont getvwhy i cant even run my container now
--so i just run docker compose up and i can get the containrs to run but not on compose build --not sure why but i try to prune all the images but so the best for demo index html at port 8000 is an empty array []--
+] Building 43.4s (10/15)
=> [internal] load build definition from Dockerfile 5.1s
=> => transferring dockerfile: 32B 0.1s
=> [internal] load .dockerignore 2.7s
=> => transferring context: 35B 0.0s
=> [internal] load metadata for docker.io/library/python:3.7 2.7s
=> [auth] library/python:pull token for registry-1.docker.io 0.0s
=> [internal] load build context 1.7s
=> => transferring context: 7.99kB 0.8s
=> [ 1/10] FROM docker.io/library/python:3.7@sha256:5362766ecaf46aee86aa9a6d9a3d23f7019dc2e5449ce1a97866c4ae0059 0.0s
=> CACHED [ 2/10] RUN mkdir /code 0.0s
=> CACHED [ 3/10] ADD ./examples/ /code/examples 0.0s
=> CACHED [ 4/10] WORKDIR /code 0.0s
=> ERROR [ 5/10] RUN pip install git+https://github.com/toluaina/pgsync.git 32.5s
[ 5/10] RUN pip install git+https://github.com/toluaina/pgsync.git:
#0 14.72 Collecting git+https://github.com/toluaina/pgsync.git
#0 14.72 Cloning https://github.com/toluaina/pgsync.git to /tmp/pip-req-build-4ee0nify
#0 14.79 Running command git clone --filter=blob:none --quiet https://github.com/toluaina/pgsync.git /tmp/pip-req-build-4ee0nify
#0 18.18 Resolved https://github.com/toluaina/pgsync.git to commit 0c58a65
#0 18.20 Installing build dependencies: started
#0 24.92 Installing build dependencies: finished with status 'done'
#0 24.92 Getting requirements to build wheel: started
#0 25.21 Getting requirements to build wheel: finished with status 'done'
#0 25.22 Installing backend dependencies: started
#0 27.04 Installing backend dependencies: finished with status 'done'
#0 27.05 Preparing metadata (pyproject.toml): started
#0 28.04 Preparing metadata (pyproject.toml): finished with status 'done'
#0 28.46 Collecting opensearch-py==2.2.0
#0 28.64 Downloading opensearch_py-2.2.0-py2.py3-none-any.whl (291 kB)
#0 28.93 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 291.0/291.0 kB 1.0 MB/s eta 0:00:00
#0 29.26 Collecting certifi==2023.5.7
#0 29.29 Downloading certifi-2023.5.7-py3-none-any.whl (156 kB)
#0 29.46 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 157.0/157.0 kB 963.3 kB/s eta 0:00:00
#0 29.83 Collecting isort==5.11.5
#0 29.87 Downloading isort-5.11.5-py3-none-any.whl (104 kB)
#0 30.09 ━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━━ 104.1/104.1 kB 447.3 kB/s eta 0:00:00
#0 30.43 ERROR: Ignored the following versions that require a different python version: 3.20.0 Requires-Python >=3.8; 3.20.1 Requires-Python >=3.8; 5.12.0 Requires-Python >=3.8.0
#0 30.43 ERROR: Could not find a version that satisfies the requirement marshmallow==3.20.1 (from pgsync) (from versions: 0.1.0, 0.2.0, 0.2.1, 0.3.0, 0.3.1, 0.4.0, 0.4.1, 0.5.0, 0.5.1, 0.5.2, 0.5.3, 0.5.4, 0.5.5, 0.6.0, 0.7.0, 1.0.0a0, 1.0.0, 1.0.1, 1.1.0, 1.2.0, 1.2.1, 1.2.2, 1.2.3, 1.2.4, 1.2.5, 1.2.6, 2.0.0a1, 2.0.0b1, 2.0.0b2, 2.0.0b3, 2.0.0b4, 2.0.0b5, 2.0.0rc1, 2.0.0rc2, 2.0.0, 2.1.0, 2.1.1, 2.1.2, 2.1.3, 2.2.0, 2.2.1, 2.3.0, 2.4.0, 2.4.1, 2.4.2, 2.5.0, 2.6.0, 2.6.1, 2.7.0, 2.7.1, 2.7.2, 2.7.3, 2.8.0, 2.9.0, 2.9.1, 2.10.0, 2.10.1, 2.10.2, 2.10.3, 2.10.4, 2.10.5, 2.11.0, 2.11.1, 2.12.0, 2.12.1, 2.12.2, 2.13.0, 2.13.1, 2.13.2, 2.13.3, 2.13.4, 2.13.5, 2.13.6, 2.14.0, 2.15.0, 2.15.1, 2.15.2, 2.15.3, 2.15.4, 2.15.5, 2.15.6, 2.16.0, 2.16.1, 2.16.2, 2.16.3, 2.17.0, 2.18.0, 2.18.1, 2.19.0, 2.19.1, 2.19.2, 2.19.3, 2.19.4, 2.19.5, 2.20.0, 2.20.1, 2.20.2, 2.20.3, 2.20.4, 2.20.5, 2.21.0, 3.0.0a1, 3.0.0b1, 3.0.0b2, 3.0.0b3, 3.0.0b4, 3.0.0b5, 3.0.0b6, 3.0.0b7, 3.0.0b8, 3.0.0b9, 3.0.0b10, 3.0.0b11, 3.0.0b12, 3.0.0b13, 3.0.0b14, 3.0.0b15, 3.0.0b16, 3.0.0b17, 3.0.0b18, 3.0.0b19, 3.0.0b20, 3.0.0rc1, 3.0.0rc2, 3.0.0rc3, 3.0.0rc4, 3.0.0rc5, 3.0.0rc6, 3.0.0rc7, 3.0.0rc8, 3.0.0rc9, 3.0.0, 3.0.1, 3.0.2, 3.0.3, 3.0.4, 3.0.5, 3.1.0, 3.1.1, 3.2.0, 3.2.1, 3.2.2, 3.3.0, 3.4.0, 3.5.0, 3.5.1, 3.5.2, 3.6.0, 3.6.1, 3.7.0, 3.7.1, 3.8.0, 3.9.0, 3.9.1, 3.10.0, 3.11.0, 3.11.1, 3.12.0, 3.12.1, 3.12.2, 3.13.0, 3.14.0, 3.14.1, 3.15.0, 3.16.0, 3.17.0, 3.17.1, 3.18.0, 3.19.0)
#0 30.43 ERROR: No matching distribution found for marshmallow==3.20.1
#0 30.44
#0 30.44 [notice] A new release of pip is available: 23.0.1 -> 23.2.1
#0 30.44 [notice] To update, run: pip install --upgrade pip
failed to solve: executor failed running [/bin/sh -c pip install git+https://github.com/toluaina/pgsync.git]: exit code: 1
C:\Users\Roberto\Desktop\4thSemester\InterShip\PostInternship\July2023\june29th2023\pgsync-mainJune29th23at10amWORKS\pgsync-main>--after removing all aimages containers and volumes i still have this error --
--update --i had to chamge the main dockerfile to use from python3.9 --my system python version--
--http://localhost:8000/?q=facilityDiscountID:00b90095-edb4-47c6-98d8-24bd99e6
returns [ ]
---{{datasyncES}}/csdatabase/_search?q=facilityDiscountID:00b90095-edb4-47c6-98d8-24bd99e6
rerturns data api
The browser url return empty array but api endpoints has elastic search data
Not sure what is the issue but i still dont have index html return
Hello if you are able to solve it kindly let me know
Thank you
Were you able to get the demo example data working or is this your own custom dataset?
You could have run the server with ./runserver
You need to open the actual index.html on the filesystem e.g file:///Users/USER/pgsync/demo/index.html
I admit the demo need a bit more work to make it one click and run
hello yes the sync works for any dataset i chose in the examples folder and yes i created a custom dataset in the examples folder and it works for sync and its what i was trying to access in the front end--i did do ./runserver but i just get an empty array symbol [ ] -- i could try your airbnb dataset --but i will try to open the index html to the path you said but i not sure i get what you mean for that --ok thxz--
Hello if you mean access index html by by the file path in the browser when the docker container Docker containers actually are all running then yes I have I have tried that also and all it says is so I go to localhost 8000 or I go to the file path index HTML right I open it directly in the browser with the file path in my my C drive and I still get like a page cannot be loaded or you know something like--''''---- actually I stand corrected when when I do access the index HTML file in its file path in the browser obviously yes the index HTML code will appear and I see a search box and maybe some title but I am not able to search the elasticsearch database through postgres so what should I do
hello i have the docker containers running and they sync in postman for api endpoints between elastic and postgres and i have the python server running at port 8000 and i open index html directly in my browser and i made a query iht eserach box and this is my eroor
ailed to load resource: the server responded with a status of 500 (Internal Server Error)
index.html:1 Uncaught (in promise) SyntaxError: Unexpected non-whitespace character after JSON at position 4
localhost:8000/?q=Su:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
index.html:1 Uncaught (in promise) SyntaxError: Unexpected non-whitespace character after JSON at position 4
localhost:8000/?q=Surr:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
index.html:1 Uncaught (in promise) SyntaxError: Unexpected non-whitespace character after JSON at position 4
localhost/:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
VM12:1 Uncaught (in promise) SyntaxError: Unexpected non-whitespace character after JSON at position 4
localhost/:1 Failed to load resource: the server responded with a status of 500 (Internal Server Error)
VM13:1 Uncaught (in promise) SyntaxError: Unexpected non-whitespace character after JSON at position 4
---in the network tab i see it tried many ngrams of the word i put Surrey(its in my city table and name column) --like sur or surr or surre or surr or surrey and i get the same error so do i need to change the query liek the api endpoint ?
Request URL:
http://localhost:8000/?q=Su
Request Method:
GET
Status Code:
500 Internal Server Error
Remote Address:
127.0.0.1:8000
Referrer Policy:
strict-origin-when-cross-origin
Access-Control-Allow-Credentials:
true
Access-Control-Allow-Origin:
null
Access-Control-Expose-Headers:
Content-Length,Date,Server,Connection
Connection:
close
Content-Length:
8487
Content-Type:
text/plain; charset=utf-8
Date:
Tue, 01 Aug 2023 10:37:27 GMT
Server:
Python/3.9 aiohttp/3.8.5
Accept:
/
Accept-Encoding:
gzip, deflate, br
Accept-Language:
en-US,en;q=0.9
Connection:
keep-alive
Host:
localhost:8000
Origin:
null
Sec-Ch-Ua:
"Not/A)Brand";v="99", "Google Chrome";v="115", "Chromium";v="115"
Sec-Ch-Ua-Mobile:
?0
Sec-Ch-Ua-Platform:
"Windows"
Sec-Fetch-Dest:
empty
Sec-Fetch-Mode:
cors
Sec-Fetch-Site:
cross-site
User-Agent:
Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/115.0.0.0 Safari/537.36
New CSS subgrid badge
Enable the subgrid badge to inspect and debug nested grid in the Elements panel.
Ignore content scripts by default
The debugger will automatically ignore content scripts injected by extensions.
Shortcut to set conditional breakpoints
Set a conditional breakpoint quicker using the Control / Command + click keyboard shortcut in the Sources panel.
Hello i have not been able to make it work
If you succeed to get it to work kindly update
Thank you