I spent the entire night trying to find where my code is breaking, and finally narrowed it down to this. This is the full error message that i received:
"Traceback (most recent call last):
File "/var/www/html/ngram_pos/service/word_service/checker.py", line 11, in import nltk # type: ignore
File "/var/www/html/ngram_pos/service/word_service/../../src/nlp_nltk_3.6.2_deb/nltk/__init__.py", line 133, in from nltk.text import *
File "/var/www/html/ngram_pos/service/word_service/../../src/nlp_nltk_3.6.2_deb/nltk/text.py", line 30, in from nltk.tokenize import sent_tokenize
File "/var/www/html/ngram_pos/service/word_service/../../src/nlp_nltk_3.6.2_deb/nltk/tokenize/__init__.py", line 66, in from nltk.tokenize.casual import TweetTokenizer, casual_tokenize
File "/var/www/html/ngram_pos/service/word_service/../../src/nlp_nltk_3.6.2_deb/nltk/tokenize/casual.py", line 38, in import regex # https://github.com/nltk/nltk/issues/2409
File "/var/www/html/ngram_pos/service/word_service/../../src/nlp_nltk_3.6.2_deb/regex/__init__.py", line 1, in from .regex import *
File "/var/www/html/ngram_pos/service/word_service/../../src/nlp_nltk_3.6.2_deb/regex/regex.py", line 419, in import regex._regex_core as _regex_core
File "/var/www/html/ngram_pos/service/word_service/../../src/nlp_nltk_3.6.2_deb/regex/_regex_core.py", line 21, in import regex._regex as _regex ModuleNotFoundError: No module named 'regex._regex' "
I am running this on an ubuntu server, version 22.04. The python version is 3.10.
Source code is a PHP file, where the main problem statement is this:
$str_output = shell_exec($command_exec);
Where
$command_exec = python3 checker.py 'what ;should ;I ;avoid ;while ;writing ;in ;English ;what should ;should I ;I avoid ;avoid while ;while writing ;writing in ;in English ;what should I ;should I avoid ;I avoid while ;avoid while writing ;while writing in ;writing in English ' ';' 2>&1
checker.py is the python file that the code in PHP is running through shell, and the rest of the problem statements can be seen through the error message, which highlights all of them.
Further elaboration: I am working on a local server in Ubuntu, where all the files were given to me.
I am really new to all this so please tell me what all information is needed to solve this issue