Open lisawebcoder opened 1 year ago
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
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
--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
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
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 the runserver.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:
/static/
, or if there's a designated endpoint to serve static files)./
and responds with the content of index.html
.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 the index.html
file.
Ensure that the application's web server or framework is configured to serve static files from the appropriate directory (usually named static
or public
).
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 []--
[ 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 0c58a657a15f989df87dbdff027e03b7c4c5b202
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
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):