Failed to crawl due to charmap error
"[LOG] 🌤️ Warming up the WebCrawler
Error retrieving cached URL: no such column: links
[LOG] 🌞 WebCrawler is ready to crawl
Error retrieving cached URL: no such column: links
[ERROR] 🚫 Failed to crawl https://www.nbcnews.com/business, error: Failed to crawl https://www.nbcnews.com/business: 'charmap' codec can't encode character '\x80' in position 511317: character maps to
I get this error while i have my encoding set to utf-8 on vs code. I'm new and it's probably stupid error but hopefully somebody can help me.
I'm facing the same issue
@pixelr-d Never say that my friend, every great discovery started from a "stupid" moment :) Btw I checked, there is no such error.
Please help me to replicate the error. You can share with me your system/os details, also your code please. Let me have fun with your stupid error ;) Same to you @Rishinc2000 , please share your case.
Sure @unclecode, I am running on Windows 11 using VS Code. I created a Python 3.11 conda environment and only installed this repo. Then I ran the first example code given in the repo. I am getting a charmap error. I am attaching an image of the code and the output here, I hope you can help me get it running.
@Rishinc2000 I am checking it, will update you soon
Using the newest python on windows 10 on vs code, downloaded the basic version of library. The demo code gives error as in @Rishinc2000 image
@pixelr-d @Rishinc2000 This has been resolved in the new version v0.2.74. Please kindly clean up everything, then proceed with these steps and test your code again. The code below shows how I tested it on my Windows machine. It is now functioning after resolving the problem. Better also to remove ".crawl4ai" from your home directory.
git clone https://github.com/unclecode/crawl4ai
cd crawl4ai
py -3.11 -m venv myenv
myenv\Scripts\activate
pip install -e .
This should work, please let me know if you still have the issue.
@unclecode Works great and no further issues
Now it's working for almost all the websites thank you for all the support. I want to know how to use local LLMs?
@xarchangel12 Simply pass ollama model like this:
result = crawler.run(
url=url,
word_count_threshold=1,
extraction_strategy= LLMExtractionStrategy(
provider= "ollama/phi3", api_token = "no-token",
... Rest of your Parameters ...
),
bypass_cache=True,
)