Code Monkey home page Code Monkey logo

Comments (9)

aleksbobic avatar aleksbobic commented on September 27, 2024

Hi @77bgh thanks for reaching out! Could you please let me know what branch you are using? Also does docker have access to your local system (i.e. can it create a volume)? If it can you should see a hidden mongo folder in the project directory.

from csx.

77bgh avatar 77bgh commented on September 27, 2024

hello, this is what I see in Docker

image

and containers

image

from csx.

aleksbobic avatar aleksbobic commented on September 27, 2024

Hi based on your containers it seems like you ran an older version (you're also running elastic and the analytics containers). What I would suggest is that you remove the existing containers, switch to the developer bench and run docker compose up --build from the develop branch. You should see only the following 3 containers running:

  • server
  • app
  • mongo

from csx.

77bgh avatar 77bgh commented on September 27, 2024

I did as instructed, deleted everything then docker compose up --build

image

but I still have the same error when uploading the sample csv

this is the csx sever log

2023-07-11 19:40:18 INFO: Will watch for changes in these directories: ['/cs']
2023-07-11 19:40:18 INFO: Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
2023-07-11 19:40:18 INFO: Started reloader process [1] using StatReload
2023-07-11 19:40:21 Process SpawnProcess-1:
2023-07-11 19:40:21 Traceback (most recent call last):
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
2023-07-11 19:40:21 self.run()
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/multiprocessing/process.py", line 108, in run
2023-07-11 19:40:21 self._target(*self._args, **self._kwargs)
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
2023-07-11 19:40:21 target(sockets=sockets)
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/uvicorn/server.py", line 61, in run
2023-07-11 19:40:21 return asyncio.run(self.serve(sockets=sockets))
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/asyncio/runners.py", line 44, in run
2023-07-11 19:40:21 return loop.run_until_complete(main)
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
2023-07-11 19:40:21 return future.result()
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/uvicorn/server.py", line 68, in serve
2023-07-11 19:40:21 config.load()
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/uvicorn/config.py", line 473, in load
2023-07-11 19:40:21 self.loaded_app = import_from_string(self.app)
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/uvicorn/importer.py", line 21, in import_from_string
2023-07-11 19:40:21 module = importlib.import_module(module_str)
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
2023-07-11 19:40:21 return _bootstrap._gcd_import(name[level:], package, level)
2023-07-11 19:40:21 File "", line 1014, in _gcd_import
2023-07-11 19:40:21 File "", line 991, in _find_and_load
2023-07-11 19:40:21 File "", line 975, in _find_and_load_unlocked
2023-07-11 19:40:21 File "", line 671, in _load_unlocked
2023-07-11 19:40:21 File "", line 843, in exec_module
2023-07-11 19:40:21 File "", line 219, in _call_with_frames_removed
2023-07-11 19:40:21 File "/cs/app/main.py", line 5, in
2023-07-11 19:40:21 from app.routes.search import router as search_router
2023-07-11 19:40:21 File "/cs/app/routes/search.py", line 13, in
2023-07-11 19:40:21 import app.services.data.elastic as csx_es
2023-07-11 19:40:21 File "/cs/app/services/data/elastic.py", line 13, in
2023-07-11 19:40:21 nlp = spacy.load("en_core_web_sm")
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/spacy/init.py", line 50, in load
2023-07-11 19:40:21 return util.load_model(
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/spacy/util.py", line 324, in load_model
2023-07-11 19:40:21 return load_model_from_package(name, **kwargs)
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/spacy/util.py", line 357, in load_model_from_package
2023-07-11 19:40:21 return cls.load(vocab=vocab, disable=disable, exclude=exclude, config=config)
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/en_core_web_sm/init.py", line 10, in load
2023-07-11 19:40:21 return load_model_from_init_py(file, **overrides)
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/spacy/util.py", line 517, in load_model_from_init_py
2023-07-11 19:40:21 return load_model_from_path(
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/spacy/util.py", line 392, in load_model_from_path
2023-07-11 19:40:21 nlp = load_model_from_config(config, vocab=vocab, disable=disable, exclude=exclude)
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/spacy/util.py", line 429, in load_model_from_config
2023-07-11 19:40:21 nlp = lang_cls.from_config(
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/spacy/language.py", line 1672, in from_config
2023-07-11 19:40:21 nlp.add_pipe(
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/spacy/language.py", line 774, in add_pipe
2023-07-11 19:40:21 pipe_component = self.create_pipe(
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/spacy/language.py", line 660, in create_pipe
2023-07-11 19:40:21 resolved = registry.resolve(cfg, validate=validate)
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/thinc/config.py", line 746, in resolve
2023-07-11 19:40:21 resolved, _ = cls._make(
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/thinc/config.py", line 795, in _make
2023-07-11 19:40:21 filled, _, resolved = cls._fill(
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/thinc/config.py", line 850, in _fill
2023-07-11 19:40:21 filled[key], validation[v_key], final[key] = cls._fill(
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/thinc/config.py", line 849, in _fill
2023-07-11 19:40:21 promise_schema = cls.make_promise_schema(value, resolve=resolve)
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/site-packages/thinc/config.py", line 1057, in make_promise_schema
2023-07-11 19:40:21 return create_model("ArgModel", **sig_args)
2023-07-11 19:40:21 File "pydantic/main.py", line 990, in pydantic.main.create_model
2023-07-11 19:40:21 File "pydantic/main.py", line 299, in pydantic.main.ModelMetaclass.new
2023-07-11 19:40:21 File "pydantic/fields.py", line 411, in pydantic.fields.ModelField.infer
2023-07-11 19:40:21 File "pydantic/fields.py", line 342, in pydantic.fields.ModelField.init
2023-07-11 19:40:21 File "pydantic/fields.py", line 451, in pydantic.fields.ModelField.prepare
2023-07-11 19:40:21 File "pydantic/fields.py", line 550, in pydantic.fields.ModelField._type_analysis
2023-07-11 19:40:21 File "/usr/local/lib/python3.8/typing.py", line 774, in subclasscheck
2023-07-11 19:40:21 return issubclass(cls, self.origin)
2023-07-11 19:40:21 TypeError: issubclass() arg 1 must be a class

from csx.

aleksbobic avatar aleksbobic commented on September 27, 2024

Hi @77bgh based on the logs, in particular this line 2023-07-11 19:40:21 File "/cs/app/services/data/elastic.py", line 13, in it seems that you somehow still have the same version as before since elastic.py should be located in /cs/app/services/search/elastic_search_connector.py.

Maybe the containers were removed but the docker images were not removed? So make sure that the above file is present in both docker and the local version. Based on the logs it also seems the error is connected to the SpaCy version. I think once you upgrade to the latest develop branch and also build it you shouldn't have the SpaCy issue anymore.

Please let me know if the issue persists.

from csx.

77bgh avatar 77bgh commented on September 27, 2024

I deleted everything but still the same error , these are the server logs

2023-07-12 09:56:06 INFO: Stopping reloader process [1]
2023-07-12 09:56:07 INFO: Will watch for changes in these directories: ['/cs']
2023-07-12 09:56:07 INFO: Uvicorn running on http://0.0.0.0:80 (Press CTRL+C to quit)
2023-07-12 09:56:07 INFO: Started reloader process [1] using StatReload
2023-07-12 09:56:09 Process SpawnProcess-1:
2023-07-12 09:56:09 Traceback (most recent call last):
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/multiprocessing/process.py", line 315, in _bootstrap
2023-07-12 09:56:09 self.run()
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/multiprocessing/process.py", line 108, in run
2023-07-12 09:56:09 self._target(*self._args, **self._kwargs)
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/uvicorn/_subprocess.py", line 76, in subprocess_started
2023-07-12 09:56:09 target(sockets=sockets)
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/uvicorn/server.py", line 61, in run
2023-07-12 09:56:09 return asyncio.run(self.serve(sockets=sockets))
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/asyncio/runners.py", line 44, in run
2023-07-12 09:56:09 return loop.run_until_complete(main)
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/asyncio/base_events.py", line 616, in run_until_complete
2023-07-12 09:56:09 return future.result()
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/uvicorn/server.py", line 68, in serve
2023-07-12 09:56:09 config.load()
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/uvicorn/config.py", line 473, in load
2023-07-12 09:56:09 self.loaded_app = import_from_string(self.app)
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/uvicorn/importer.py", line 21, in import_from_string
2023-07-12 09:56:09 module = importlib.import_module(module_str)
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/importlib/init.py", line 127, in import_module
2023-07-12 09:56:09 return _bootstrap._gcd_import(name[level:], package, level)
2023-07-12 09:56:09 File "", line 1014, in _gcd_import
2023-07-12 09:56:09 File "", line 991, in _find_and_load
2023-07-12 09:56:09 File "", line 975, in _find_and_load_unlocked
2023-07-12 09:56:09 File "", line 671, in _load_unlocked
2023-07-12 09:56:09 File "", line 843, in exec_module
2023-07-12 09:56:09 File "", line 219, in _call_with_frames_removed
2023-07-12 09:56:09 File "/cs/app/main.py", line 5, in
2023-07-12 09:56:09 from app.routes.search import router as search_router
2023-07-12 09:56:09 File "/cs/app/routes/search.py", line 13, in
2023-07-12 09:56:09 import app.services.data.elastic as csx_es
2023-07-12 09:56:09 File "/cs/app/services/data/elastic.py", line 13, in
2023-07-12 09:56:09 nlp = spacy.load("en_core_web_sm")
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/spacy/init.py", line 50, in load
2023-07-12 09:56:09 return util.load_model(
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/spacy/util.py", line 324, in load_model
2023-07-12 09:56:09 return load_model_from_package(name, **kwargs)
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/spacy/util.py", line 357, in load_model_from_package
2023-07-12 09:56:09 return cls.load(vocab=vocab, disable=disable, exclude=exclude, config=config)
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/en_core_web_sm/init.py", line 10, in load
2023-07-12 09:56:09 return load_model_from_init_py(file, **overrides)
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/spacy/util.py", line 517, in load_model_from_init_py
2023-07-12 09:56:09 return load_model_from_path(
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/spacy/util.py", line 392, in load_model_from_path
2023-07-12 09:56:09 nlp = load_model_from_config(config, vocab=vocab, disable=disable, exclude=exclude)
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/spacy/util.py", line 429, in load_model_from_config
2023-07-12 09:56:09 nlp = lang_cls.from_config(
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/spacy/language.py", line 1672, in from_config
2023-07-12 09:56:09 nlp.add_pipe(
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/spacy/language.py", line 774, in add_pipe
2023-07-12 09:56:09 pipe_component = self.create_pipe(
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/spacy/language.py", line 660, in create_pipe
2023-07-12 09:56:09 resolved = registry.resolve(cfg, validate=validate)
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/thinc/config.py", line 746, in resolve
2023-07-12 09:56:09 resolved, _ = cls._make(
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/thinc/config.py", line 795, in _make
2023-07-12 09:56:09 filled, _, resolved = cls._fill(
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/thinc/config.py", line 850, in _fill
2023-07-12 09:56:09 filled[key], validation[v_key], final[key] = cls._fill(
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/thinc/config.py", line 849, in _fill
2023-07-12 09:56:09 promise_schema = cls.make_promise_schema(value, resolve=resolve)
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/site-packages/thinc/config.py", line 1057, in make_promise_schema
2023-07-12 09:56:09 return create_model("ArgModel", **sig_args)
2023-07-12 09:56:09 File "pydantic/main.py", line 990, in pydantic.main.create_model
2023-07-12 09:56:09 File "pydantic/main.py", line 299, in pydantic.main.ModelMetaclass.new
2023-07-12 09:56:09 File "pydantic/fields.py", line 411, in pydantic.fields.ModelField.infer
2023-07-12 09:56:09 File "pydantic/fields.py", line 342, in pydantic.fields.ModelField.init
2023-07-12 09:56:09 File "pydantic/fields.py", line 451, in pydantic.fields.ModelField.prepare
2023-07-12 09:56:09 File "pydantic/fields.py", line 550, in pydantic.fields.ModelField._type_analysis
2023-07-12 09:56:09 File "/usr/local/lib/python3.8/typing.py", line 774, in subclasscheck
2023-07-12 09:56:09 return issubclass(cls, self.origin)
2023-07-12 09:56:09 TypeError: issubclass() arg 1 must be a class

These are the images I use , no elastic

image

from csx.

aleksbobic avatar aleksbobic commented on September 27, 2024

Hi could you please try the fix in this answer (it seems that limiting the typing_extensions version works): https://github.com/explosion/spaCy/issues/12659
So just remove everything, add the specific version to requirements.txt in the app folder.

from csx.

77bgh avatar 77bgh commented on September 27, 2024

perfect, that fix worked :)

I'm in , starting testing it

image

from csx.

aleksbobic avatar aleksbobic commented on September 27, 2024

Fantastic! Thanks for your patience and enjoy testing it! Let me know if you stumble upon any other issues or have further questions :)

from csx.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.