James Nesta
02/08/2023, 9:32 PMTEAR_FALLING_ACCELERATION
results in: No results for "TEAR_FALLING_ACCELERATION"
Is there something else that I forgot to do for a Docusaurus website?Jason Bosco
02/08/2023, 10:50 PMJason Bosco
02/08/2023, 10:51 PMhierarcy.lvl3
Jason Bosco
02/08/2023, 10:51 PMJason Bosco
02/08/2023, 10:52 PMTEAR_FALLING_ACCELERATION
in the James Nesta
02/08/2023, 10:53 PMJason Bosco
02/08/2023, 10:54 PMsplit_join_tokens: true
to themeConfig.typesense.typesenseSearchParameters
to see if that helps?Jason Bosco
02/08/2023, 10:55 PMsplit_join_tokens: always
James Nesta
02/08/2023, 11:24 PMJason Bosco
02/08/2023, 11:26 PMsymbols_to_index
in the collection schema, and set it to ["_"]
Jason Bosco
02/08/2023, 11:26 PMJason Bosco
02/08/2023, 11:27 PMJason Bosco
02/08/2023, 11:28 PM'name': self.collection_name_tmp,
'symbols_to_index': '_',
'fields': [...]
...
James Nesta
02/08/2023, 11:59 PMJames Nesta
02/09/2023, 12:41 AMJason Bosco
02/09/2023, 12:42 AMJames Nesta
02/09/2023, 12:46 AMpip install --user pipenv
• That worked, but then I got an error about Python 3.6 not being installed.
• In order to install Python 3.6, I determined that I needed to install pyenv, so I ran:
sudo apt-get update; sudo apt-get install make build-essential libssl-dev zlib1g-dev libbz2-dev libreadline-dev libsqlite3-dev wget curl llvm libncursesw5-dev xz-utils tk-dev libxml2-dev libxmlsec1-dev libffi-dev liblzma-dev
And then:
curl <https://pyenv.run> | bash
Then I was able to do:
pyenv install 3.6.3
But then I got an error when creating the env:
james@2wsx:~/typesense-docsearch-scraper$ pipenv shell
Creating a virtualenv for this project...
Pipfile: /home/james/typesense-docsearch-scraper/Pipfile
Using /home/james/.pyenv/versions/3.6.3/bin/python3.6m (3.6.3) to create virtualenv...
⠧ Creating virtual environment...fail
Traceback (most recent call last):
File "/usr/lib/python3/dist-packages/virtualenv/seed/embed/via_app_data/via_app_data.py", line 84, in _get
result = get_wheel(
File "/usr/lib/python3/dist-packages/virtualenv/seed/wheels/acquire.py", line 26, in get_wheel
wheel = from_bundle(distribution, version, for_py_version, search_dirs, app_data, do_periodic_update, env)
File "/usr/lib/python3/dist-packages/virtualenv/seed/wheels/bundle.py", line 13, in from_bundle
wheel = load_embed_wheel(app_data, distribution, for_py_version, of_version)
File "/usr/lib/python3/dist-packages/virtualenv/seed/wheels/bundle.py", line 33, in load_embed_wheel
wheel = get_embed_wheel(distribution, for_py_version)
File "/usr/lib/python3/dist-packages/virtualenv/seed/wheels/embed/__init__.py", line 77, in get_embed_wheel
raise Exception((
Exception: Wheel for pip for Python 3.6 is unavailable. apt install python3-pip-whl
created virtual environment CPython3.6.3.final.0-64 in 1417ms
creator CPython3Posix(dest=/home/james/.local/share/virtualenvs/typesense-docsearch-scraper-fJqFon_Y, clear=False, no_vcs_ignore=False, global=False)
seeder FromAppData(download=False, pip=bundle, setuptools=bundle, wheel=bundle, via=copy, app_data_dir=/home/james/.local/share/virtualenv)
added seed packages: pip==21.3.1, setuptools==59.6.0, wheel==0.37.1
activators BashActivator,CShellActivator,FishActivator,NushellActivator,PowerShellActivator,PythonActivator
✔ Successfully created virtual environment!
Virtualenv location: /home/james/.local/share/virtualenvs/typesense-docsearch-scraper-fJqFon_Y
Launching subshell in virtual environment...
. /home/james/.local/share/virtualenvs/typesense-docsearch-scraper-fJqFon_Y/bin/activate
I proceeded anyway, and crossed my fingers, but the next command also fails:
james@2wsx:~/typesense-docsearch-scraper$ pipenv shell
Launching subshell in virtual environment...
. /home/james/.local/share/virtualenvs/typesense-docsearch-scraper-fJqFon_Y/bin/activate
james@2wsx:~/typesense-docsearch-scraper$ . /home/james/.local/share/virtualenvs/typesense-docsearch-scraper-fJqFon_Y/bin/activate
(typesense-docsearch-scraper) james@2wsx:~/typesense-docsearch-scraper$
(typesense-docsearch-scraper) james@2wsx:~/typesense-docsearch-scraper$
(typesense-docsearch-scraper) james@2wsx:~/typesense-docsearch-scraper$ ./docsearch docker:build
Traceback (most recent call last):
File "./docsearch", line 3, in <module>
from cli.src.index import run
File "/home/james/typesense-docsearch-scraper/cli/src/index.py", line 3, in <module>
from dotenv import load_dotenv
ModuleNotFoundError: No module named 'dotenv'
(typesense-docsearch-scraper) james@2wsx:~/typesense-docsearch-scraper$ pip install dotenv
Collecting dotenv
Downloading dotenv-0.0.5.tar.gz (2.4 kB)
Preparing metadata (setup.py) ... error
ERROR: Command errored out with exit status -11:
command: /home/james/.local/share/virtualenvs/typesense-docsearch-scraper-fJqFon_Y/bin/python -c 'import io, os, sys, setuptools, tokenize; sys.argv[0] = '"'"'/tmp/pip-install-apjacqc9/dotenv_ddf8c6da6ef9463bb8285aad152279ed/setup.py'"'"'; __file__='"'"'/tmp/pip-install-apjacqc9/dotenv_ddf8c6da6ef9463bb8285aad152279ed/setup.py'"'"';f = getattr(tokenize, '"'"'open'"'"', open)(__file__) if os.path.exists(__file__) else io.StringIO('"'"'from setuptools import setup; setup()'"'"');code = f.read().replace('"'"'\r\n'"'"', '"'"'\n'"'"');f.close();exec(compile(code, __file__, '"'"'exec'"'"'))' egg_info --egg-base /tmp/pip-pip-egg-info-lxvlxqvp
cwd: /tmp/pip-install-apjacqc9/dotenv_ddf8c6da6ef9463bb8285aad152279ed/
Complete output (0 lines):
----------------------------------------
WARNING: Discarding <https://files.pythonhosted.org/packages/e2/46/3754073706e31670eed18bfa8a879305b56a471db15f20523c2427b10078/dotenv-0.0.5.tar.gz#sha256=b58d2ab3f83dbd4f8a362b21158a606bee87317a9444485566b3c8f0af847091> (from <https://pypi.org/simple/dotenv/>). Command errored out with exit status -11: python setup.py egg_info Check the logs for full command output.
Jason Bosco
02/09/2023, 12:50 AMpip install
? And then try again?James Nesta
02/09/2023, 12:51 AMJason Bosco
02/09/2023, 12:51 AMJames Nesta
02/09/2023, 12:51 AMJason Bosco
02/09/2023, 12:51 AMpipenv install
James Nesta
02/09/2023, 12:52 AMJason Bosco
02/09/2023, 12:59 AMJason Bosco
02/09/2023, 12:59 AMJason Bosco
02/09/2023, 1:00 AMJames Nesta
02/09/2023, 3:58 PMJason Bosco
02/09/2023, 4:40 PMbrew install pyenv
pyenv install 3.6
pyenv local 3.6
pip install --upgrade pip
pip install --user pipenv
pipenv install
pipenv shell
James Nesta
02/09/2023, 7:58 PMpipenv install
, you will get a bunch of errors about dependencies not being able to be resolved, so this definitely seems like a problem with the repository itself.James Nesta
02/09/2023, 8:04 PM[pipenv.exceptions.ResolutionFailure]: Warning: Your dependencies could not be resolved. You likely have a mismatch in your sub-dependencies.
You can use $ pipenv install --skip-lock to bypass this mechanism, then run $ pipenv graph to inspect the situation.
Hint: try $ pipenv lock --pre if it is a pre-release dependency.
ERROR: No matching distribution found for slacker==0.9.60
Jason Bosco
02/09/2023, 8:08 PMJason Bosco
02/09/2023, 8:08 PMJason Bosco
02/09/2023, 8:08 PMJames Nesta
02/09/2023, 8:10 PMjames@2wsx:~/typesense-docsearch-scraper$ python --version
Python 3.6.15
James Nesta
02/09/2023, 8:10 PMJames Nesta
02/09/2023, 8:10 PMJason Bosco
02/09/2023, 9:49 PMJason Bosco
02/09/2023, 9:49 PMJames Nesta
02/09/2023, 9:50 PMJason Bosco
02/09/2023, 11:16 PMJames Nesta
02/09/2023, 11:17 PMJason Bosco
02/09/2023, 11:17 PMJames Nesta
02/09/2023, 11:17 PMJason Bosco
02/09/2023, 11:18 PMJames Nesta
02/09/2023, 11:18 PMpyenv local 3.6
command, since that takes a particularly long time.James Nesta
02/09/2023, 11:19 PMJames Nesta
02/09/2023, 11:19 PMJason Bosco
02/09/2023, 11:19 PMJames Nesta
02/09/2023, 11:20 PMJames Nesta
02/09/2023, 11:21 PMJason Bosco
02/09/2023, 11:22 PMJames Nesta
02/09/2023, 11:22 PMJason Bosco
02/09/2023, 11:22 PMJason Bosco
02/10/2023, 12:17 AMsudo apt update && sudo apt install build-essential curl libbz2-dev libffi-dev liblzma-dev libncursesw5-dev libreadline-dev libsqlite3-dev libssl-dev libxml2-dev libxmlsec1-dev llvm make tk-dev wget xz-utils zlib1g-dev --yes
curl <https://pyenv.run> | bash
echo >> ~/.bashrc
echo '# Adding pyenv' >> ~/.bashrc
echo 'export PYENV_ROOT="$HOME/.pyenv"' >> ~/.bashrc
echo 'command -v pyenv >/dev/null || export PATH="$PYENV_ROOT/bin:$PATH"' >> ~/.bashrc
echo 'eval "$(pyenv init -)"' >> ~/.bashrc
source ~/.bashrc
pyenv install 3.9
pyenv local 3.9
pip install --upgrade pip
echo >> ~/.bashrc
echo '# Fixing pipx warning' >> ~/.bashrc
echo 'PATH=$PATH:~/.local/bin' >> ~/.bashrc
source ~/.bashrc
pip install --user pipenv
git clone <https://github.com/typesense/typesense-docsearch-scraper.git>
cd typesense-docsearch-scraper/
pipenv install
vim Pipfile # <==== Edit python version to 3.9 in Pipefile
pipenv install
pipenv shell
James Nesta
02/10/2023, 2:08 AMjames@2wsx:~/typesense-docsearch-scraper$ pipenv install
Pipfile.lock (ba301c) out of date, updating to (402916)...
Locking [packages] dependencies...
Building requirements...
Resolving dependencies...
✘ Locking Failed!
⠹ Locking...
Traceback (most recent call last):
File "/home/james/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 845, in <module>
main()
File "/home/james/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 819, in main
_ensure_modules()
File "/home/james/.local/lib/python3.9/site-packages/pipenv/resolver.py", line 16, in _ensure_modules
spec.loader.exec_module(pipenv)
File "<frozen importlib._bootstrap_external>", line 678, in exec_module
File "<frozen importlib._bootstrap>", line 219, in _call_with_frames_removed
File "/home/james/.local/lib/python3.9/site-packages/pipenv/__init__.py", line 63, in <module>
from .cli import cli
File "/home/james/.local/lib/python3.9/site-packages/pipenv/cli/__init__.py", line 1, in <module>
from .command import cli # noqa
File "/home/james/.local/lib/python3.9/site-packages/pipenv/cli/command.py", line 4, in <module>
from pipenv import environments
File "/home/james/.local/lib/python3.9/site-packages/pipenv/environments.py", line 10, in <module>
from pipenv.patched.pip._vendor.platformdirs import user_cache_dir
File "/home/james/.local/lib/python3.9/site-packages/pipenv/patched/pip/_vendor/platformdirs/__init__.py", line 5
from __future__ import annotations
^
SyntaxError: future feature annotations is not defined
James Nesta
02/10/2023, 2:13 AMJason Bosco
02/10/2023, 2:30 AMpipenv install
before editing the python version in PipfileJason Bosco
02/10/2023, 2:30 AMpipenv install
after editing python version?James Nesta
02/10/2023, 2:30 AMJason Bosco
02/10/2023, 2:31 AMpipenv --rm
pipenv --python 3.9
pipenv lock --clear
pipenv install
Jason Bosco
02/10/2023, 2:31 AMJason Bosco
02/10/2023, 2:32 AMJames Nesta
02/10/2023, 2:36 AMJason Bosco
02/10/2023, 2:36 AMJames Nesta
02/10/2023, 2:39 AMjames@2wsx:~/typesense-docsearch-scraper$ pipenv shell
Loading .env environment variables...
Loading .env environment variables...
Launching subshell in virtual environment...
. /home/james/.local/share/virtualenvs/typesense-docsearch-scraper-fJqFon_Y/bin/activate
james@2wsx:~/typesense-docsearch-scraper$ . /home/james/.local/share/virtualenvs/typesense-docsearch-scraper-fJqFon_Y/bin/activate
(typesense-docsearch-scraper) james@2wsx:~/typesense-docsearch-scraper$
(typesense-docsearch-scraper) james@2wsx:~/typesense-docsearch-scraper$
(typesense-docsearch-scraper) james@2wsx:~/typesense-docsearch-scraper$
(typesense-docsearch-scraper) james@2wsx:~/typesense-docsearch-scraper$ ./docsearch docker:build
/home/james/typesense-docsearch-scraper/cli/src/commands/run_tests.py:22: SyntaxWarning: "is" with a literal. Did you mean "=="?
if args[1] is "no_browser":
ERROR: permission denied while trying to connect to the Docker daemon socket at unix:///var/run/docker.sock: Get "<http://%2Fvar%2Frun%2Fdocker.sock/_ping>": dial unix /var/run/docker.sock: connect: permission denied
(typesense-docsearch-scraper) james@2wsx:~/typesense-docsearch-scraper$
Again, this is a fresh Ubuntu VM, and if it matters, I followed the normal steps to install Docker as according to the official Docker documentation here:
https://docs.docker.com/engine/install/ubuntu/Jason Bosco
02/10/2023, 2:40 AMJason Bosco
02/10/2023, 2:40 AMJames Nesta
02/10/2023, 2:40 AMJames Nesta
02/10/2023, 2:41 AM(typesense-docsearch-scraper) james@2wsx:~/typesense-docsearch-scraper$ sudo ./docsearch docker:build
[sudo] password for james:
/usr/bin/env: 'python': No such file or directory
Jason Bosco
02/10/2023, 2:41 AMJason Bosco
02/10/2023, 2:41 AMJason Bosco
02/10/2023, 2:41 AMsudo docker run hello-world
work?James Nesta
02/10/2023, 2:41 AMJames Nesta
02/10/2023, 2:41 AMjames@2wsx:~/typesense-docsearch-scraper$ sudo docker run hello-world
Unable to find image 'hello-world:latest' locally
latest: Pulling from library/hello-world
2db29710123e: Pull complete
Digest: sha256:aa0cc8055b82dc2509bed2e19b275c8f463506616377219d9642221ab53cf9fe
Status: Downloaded newer image for hello-world:latest
Hello from Docker!
This message shows that your installation appears to be working correctly.
To generate this message, Docker took the following steps:
1. The Docker client contacted the Docker daemon.
2. The Docker daemon pulled the "hello-world" image from the Docker Hub.
(amd64)
3. The Docker daemon created a new container from that image which runs the
executable that produces the output you are currently reading.
4. The Docker daemon streamed that output to the Docker client, which sent it
to your terminal.
To try something more ambitious, you can run an Ubuntu container with:
$ docker run -it ubuntu bash
Share images, automate workflows, and more with a free Docker ID:
<https://hub.docker.com/>
For more examples and ideas, visit:
<https://docs.docker.com/get-started/>
Jason Bosco
02/10/2023, 2:42 AMJason Bosco
02/10/2023, 2:43 AMJason Bosco
02/10/2023, 2:43 AMJames Nesta
02/10/2023, 2:43 AMJason Bosco
02/10/2023, 2:44 AMJames Nesta
02/10/2023, 2:44 AMJames Nesta
02/10/2023, 2:52 AMJames Nesta
02/10/2023, 2:53 AM=> ERROR [13/26] RUN apt-get update -y && apt-get install -yq google-chrome-stable=99.0.4844.51-1 unzip 2.5s
------
> [13/26] RUN apt-get update -y && apt-get install -yq google-chrome-stable=99.0.4844.51-1 unzip:
#0 0.362 Get:1 <http://dl.google.com/linux/chrome/deb> stable InRelease [1811 B]
#0 0.444 Hit:2 <https://deb.nodesource.com/node_8.x> bionic InRelease
#0 0.450 Hit:3 <http://security.ubuntu.com/ubuntu> bionic-security InRelease
#0 0.462 Hit:4 <http://archive.ubuntu.com/ubuntu> bionic InRelease
#0 0.481 Get:5 <http://dl.google.com/linux/chrome/deb> stable/main amd64 Packages [1061 B]
#0 0.552 Hit:6 <http://archive.ubuntu.com/ubuntu> bionic-updates InRelease
#0 0.565 Hit:7 <http://ppa.launchpad.net/openjdk-r/ppa/ubuntu> bionic InRelease
#0 0.639 Hit:8 <http://archive.ubuntu.com/ubuntu> bionic-backports InRelease
#0 0.732 Fetched 2872 B in 0s (6409 B/s)
#0 0.732 Reading package lists...
#0 1.713 Reading package lists...
#0 2.353 Building dependency tree...
#0 2.482 Reading state information...
#0 2.495 E: Version '99.0.4844.51-1' for 'google-chrome-stable' was not found
------
Dockerfile.base:37
--------------------
36 | RUN echo "deb [arch=amd64] <http://dl.google.com/linux/chrome/deb/> stable main" >> /etc/apt/sources.list.d/google-chrome.list
37 | >>> RUN apt-get update -y && apt-get install -yq \
38 | >>> google-chrome-stable=99.0.4844.51-1 \
39 | >>> unzip
40 | RUN wget -q <https://chromedriver.storage.googleapis.com/99.0.4844.51/chromedriver_linux64.zip>
--------------------
ERROR: failed to solve: process "/bin/sh -c apt-get update -y && apt-get install -yq google-chrome-stable=99.0.4844.51-1 unzip" did not complete successfully: exit code: 100
(typesense-docsearch-scraper) james@2wsx:~/typesense-docsearch-scraper$
Jason Bosco
02/10/2023, 5:52 AMJason Bosco
02/10/2023, 5:52 AMJason Bosco
02/10/2023, 5:52 AMJames Nesta
02/10/2023, 6:13 AMJason Bosco
02/10/2023, 5:43 PMJames Nesta
02/10/2023, 7:26 PMJason Bosco
02/10/2023, 7:27 PMJames Nesta
02/10/2023, 7:38 PM2023-02-10 19:38:18 [scrapy.core.scraper] ERROR: Spider error processing <GET <https://isaacscript.github.io/>> (referer: None)
Traceback (most recent call last):
File "/home/seleuser/.local/share/virtualenvs/seleuser-AdYDHarm/lib/python3.10/site-packages/twisted/internet/defer.py", line 892, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/home/seleuser/src/documentation_spider.py", line 180, in parse_from_start_url
self.add_records(response, from_sitemap=False)
File "/home/seleuser/src/documentation_spider.py", line 152, in add_records
self.typesense_helper.add_records(records, response.url, from_sitemap)
File "/home/seleuser/src/typesense_helper.py", line 65, in add_records
failed_items = list(
File "/home/seleuser/src/typesense_helper.py", line 67, in <lambda>
filter(lambda r: json.loads(json.loads(r))['success'] is False, result)))
File "/usr/lib/python3.10/json/__init__.py", line 339, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
2023-02-10 19:38:19 [scrapy.core.scraper] ERROR: Spider error processing <GET <https://isaacscript.github.io/isaac-typescript-definitions/enums/CollectibleSpriteLayer/>> (referer: <https://isaacscript.github.io/sitemap.xml>)
Jason Bosco
02/10/2023, 8:02 PMJames Nesta
02/10/2023, 8:02 PMJason Bosco
02/10/2023, 8:02 PMsrc/typesense_helper.py
Jason Bosco
02/10/2023, 8:02 PMJames Nesta
02/10/2023, 8:03 PM'symbols_to_index': '_',
I did that, and then I got an error complaining that "symbols_to_index" needed to be an array, so I assume that you just made a typo.
Then, I updated it to be this:James Nesta
02/10/2023, 8:04 PM'symbols_to_index': ['_'],
James Nesta
02/10/2023, 8:04 PMJason Bosco
02/10/2023, 8:28 PMprint(result)
right before this line and share that ouput?James Nesta
02/10/2023, 8:49 PM[{'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}]
Jason Bosco
02/10/2023, 8:49 PMJames Nesta
02/10/2023, 8:49 PM[{'success': True}]
James Nesta
02/10/2023, 8:50 PMJames Nesta
02/10/2023, 8:50 PMJames Nesta
02/10/2023, 8:50 PMjames@2wsx:~/crawler$ ./run.sh
[{'success': True}]
2023-02-10 20:48:58 [scrapy.core.scraper] ERROR: Spider error processing <GET <https://isaacscript.github.io/>> (referer: None)
Traceback (most recent call last):
File "/home/seleuser/.local/share/virtualenvs/seleuser-AdYDHarm/lib/python3.10/site-packages/twisted/internet/defer.py", line 892, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/home/seleuser/src/documentation_spider.py", line 180, in parse_from_start_url
self.add_records(response, from_sitemap=False)
File "/home/seleuser/src/documentation_spider.py", line 152, in add_records
self.typesense_helper.add_records(records, response.url, from_sitemap)
File "/home/seleuser/src/typesense_helper.py", line 66, in add_records
failed_items = list(
File "/home/seleuser/src/typesense_helper.py", line 68, in <lambda>
filter(lambda r: json.loads(json.loads(r))['success'] is False, result)))
File "/usr/lib/python3.10/json/__init__.py", line 339, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
[{'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}]
2023-02-10 20:48:58 [scrapy.core.scraper] ERROR: Spider error processing <GET <https://isaacscript.github.io/isaac-typescript-definitions/enums/ConstantStoneShooterVariant/>> (referer: <https://isaacscript.github.io/sitemap.xml>)
Traceback (most recent call last):
File "/home/seleuser/.local/share/virtualenvs/seleuser-AdYDHarm/lib/python3.10/site-packages/twisted/internet/defer.py", line 892, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/home/seleuser/src/documentation_spider.py", line 172, in parse_from_sitemap
self.add_records(response, from_sitemap=True)
File "/home/seleuser/src/documentation_spider.py", line 152, in add_records
self.typesense_helper.add_records(records, response.url, from_sitemap)
File "/home/seleuser/src/typesense_helper.py", line 66, in add_records
failed_items = list(
File "/home/seleuser/src/typesense_helper.py", line 68, in <lambda>
filter(lambda r: json.loads(json.loads(r))['success'] is False, result)))
File "/usr/lib/python3.10/json/__init__.py", line 339, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
[{'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}]
2023-02-10 20:48:59 [scrapy.core.scraper] ERROR: Spider error processing <GET <https://isaacscript.github.io/isaac-typescript-definitions/enums/CollectibleAnimation/>> (referer: <https://isaacscript.github.io/sitemap.xml>)
Traceback (most recent call last):
File "/home/seleuser/.local/share/virtualenvs/seleuser-AdYDHarm/lib/python3.10/site-packages/twisted/internet/defer.py", line 892, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/home/seleuser/src/documentation_spider.py", line 172, in parse_from_sitemap
self.add_records(response, from_sitemap=True)
File "/home/seleuser/src/documentation_spider.py", line 152, in add_records
self.typesense_helper.add_records(records, response.url, from_sitemap)
File "/home/seleuser/src/typesense_helper.py", line 66, in add_records
failed_items = list(
File "/home/seleuser/src/typesense_helper.py", line 68, in <lambda>
filter(lambda r: json.loads(json.loads(r))['success'] is False, result)))
File "/usr/lib/python3.10/json/__init__.py", line 339, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
^C[{'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}]
2023-02-10 20:49:00 [scrapy.core.scraper] ERROR: Spider error processing <GET <https://isaacscript.github.io/isaac-typescript-definitions/enums/CollectibleType/>> (referer: <https://isaacscript.github.io/sitemap.xml>)
Traceback (most recent call last):
File "/home/seleuser/.local/share/virtualenvs/seleuser-AdYDHarm/lib/python3.10/site-packages/twisted/internet/defer.py", line 892, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/home/seleuser/src/documentation_spider.py", line 172, in parse_from_sitemap
self.add_records(response, from_sitemap=True)
File "/home/seleuser/src/documentation_spider.py", line 152, in add_records
self.typesense_helper.add_records(records, response.url, from_sitemap)
File "/home/seleuser/src/typesense_helper.py", line 66, in add_records
failed_items = list(
File "/home/seleuser/src/typesense_helper.py", line 68, in <lambda>
filter(lambda r: json.loads(json.loads(r))['success'] is False, result)))
File "/usr/lib/python3.10/json/__init__.py", line 339, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
^C[{'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}]
2023-02-10 20:49:00 [scrapy.core.scraper] ERROR: Spider error processing <GET <https://isaacscript.github.io/isaac-typescript-definitions/enums/ConstantStoneShooterSubType/>> (referer: <https://isaacscript.github.io/sitemap.xml>)
Traceback (most recent call last):
File "/home/seleuser/.local/share/virtualenvs/seleuser-AdYDHarm/lib/python3.10/site-packages/twisted/internet/defer.py", line 892, in _runCallbacks
current.result = callback( # type: ignore[misc]
File "/home/seleuser/src/documentation_spider.py", line 172, in parse_from_sitemap
self.add_records(response, from_sitemap=True)
File "/home/seleuser/src/documentation_spider.py", line 152, in add_records
self.typesense_helper.add_records(records, response.url, from_sitemap)
File "/home/seleuser/src/typesense_helper.py", line 66, in add_records
failed_items = list(
File "/home/seleuser/src/typesense_helper.py", line 68, in <lambda>
filter(lambda r: json.loads(json.loads(r))['success'] is False, result)))
File "/usr/lib/python3.10/json/__init__.py", line 339, in loads
raise TypeError(f'the JSON object must be str, bytes or bytearray, '
TypeError: the JSON object must be str, bytes or bytearray, not dict
^C^C[{'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}, {'success': True}]
2023-02-10 20:49:01 [scrapy.core.scraper] ERROR: Spider error processing <GET <https://isaacscript.github.io/isaac-typescript-definitions/enums/CollectibleSpriteLayer/>> (referer: <https://isaacscript.github.io/sitemap.xml>)
Jason Bosco
02/10/2023, 9:30 PMJason Bosco
02/10/2023, 9:30 PMPipfile
typesense = "==0.10.0"
Jason Bosco
02/10/2023, 9:30 PMpipenv install
and run the scraper againJames Nesta
02/10/2023, 9:34 PMJason Bosco
02/10/2023, 9:38 PMJames Nesta
02/10/2023, 9:40 PMJason Bosco
02/10/2023, 9:41 PMJames Nesta
02/10/2023, 9:42 PMJason Bosco
02/10/2023, 9:42 PMJames Nesta
02/10/2023, 9:42 PMJames Nesta
02/10/2023, 9:43 PMJason Bosco
02/10/2023, 9:43 PMJason Bosco
02/10/2023, 9:43 PMJames Nesta
02/10/2023, 9:43 PMDEBUG:typesense.api_call:Making post /collections/isaacscript_1676064791/documents/import
DEBUG:typesense.api_call:Try 1 to node <http://isaacracing.net:8108|isaacracing.net:8108> -- healthy? True
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): <http://isaacracing.net:8108|isaacracing.net:8108>
DEBUG:urllib3.connectionpool:<https://isaacracing.net:8108> "POST /collections/isaacscript_1676064791/documents/import HTTP/1.1" 200 None
DEBUG:typesense.api_call:<http://isaacracing.net:8108|isaacracing.net:8108> is healthy. Status code: 200
['"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"']
DEBUG:typesense.api_call:Making post /collections/isaacscript_1676064791/documents/import
DEBUG:typesense.api_call:Try 1 to node <http://isaacracing.net:8108|isaacracing.net:8108> -- healthy? True
DEBUG:urllib3.connectionpool:Starting new HTTPS connection (1): <http://isaacracing.net:8108|isaacracing.net:8108>
DEBUG:urllib3.connectionpool:<https://isaacracing.net:8108> "POST /collections/isaacscript_1676064791/documents/import HTTP/1.1" 200 None
DEBUG:typesense.api_call:<http://isaacracing.net:8108|isaacracing.net:8108> is healthy. Status code: 200
['"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"', '"{\\"success\\":true}"']
James Nesta
02/10/2023, 9:44 PMJason Bosco
02/10/2023, 9:45 PMJason Bosco
02/10/2023, 9:47 PMJames Nesta
02/10/2023, 9:48 PMJason Bosco
02/10/2023, 9:48 PMJason Bosco
02/10/2023, 9:48 PMJames Nesta
02/10/2023, 9:51 PMJames Nesta
02/10/2023, 9:59 PMJames Nesta
02/10/2023, 9:59 PMJason Bosco
02/10/2023, 10:20 PMsymbols_to_index: ['_']
, could you change that to token_separators: ['_']
and then rerun the scraper?James Nesta
02/10/2023, 10:21 PMJames Nesta
02/10/2023, 10:33 PMJames Nesta
02/10/2023, 10:33 PMJason Bosco
02/10/2023, 10:41 PMJames Nesta
02/10/2023, 11:23 PMJason Bosco
02/10/2023, 11:24 PMJason Bosco
02/10/2023, 11:25 PMToo much hits, DocSearch only handle
Jason Bosco
02/10/2023, 11:25 PMJames Nesta
02/10/2023, 11:25 PMJames Nesta
02/10/2023, 11:26 PMJason Bosco
02/10/2023, 11:26 PMJason Bosco
02/10/2023, 11:27 PMJason Bosco
02/10/2023, 11:28 PMJason Bosco
02/10/2023, 11:29 PMJason Bosco
02/10/2023, 11:29 PMJames Nesta
02/10/2023, 11:33 PMJames Nesta
02/10/2023, 11:33 PMJason Bosco
02/10/2023, 11:34 PMJason Bosco
02/10/2023, 11:35 PMJason Bosco
02/10/2023, 11:36 PMJames Nesta
02/10/2023, 11:37 PMJason Bosco
02/10/2023, 11:37 PMJames Nesta
02/10/2023, 11:37 PMJason Bosco
02/10/2023, 11:38 PMJames Nesta
02/10/2023, 11:38 PMtypesense-website
, or if you wanted to take care of it.Jason Bosco
02/10/2023, 11:38 PMJames Nesta
02/10/2023, 11:45 PMJames Nesta
02/10/2023, 11:45 PMJason Bosco
02/10/2023, 11:46 PMJames Nesta
02/10/2023, 11:46 PMJames Nesta
02/10/2023, 11:46 PMJason Bosco
02/10/2023, 11:47 PMJames Nesta
02/11/2023, 12:54 AM