Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Problem with running "python LipidLynxX.py" after installation #25

Closed
IlyesAbdelhamid opened this issue Aug 2, 2022 · 4 comments
Closed
Assignees
Labels
bug Something isn't working

Comments

@IlyesAbdelhamid
Copy link

Hello,

I followed the installation user guide (section "Install from source code") here: https://github.com/SysMedOs/LipidLynxX/blob/master/doc/LipidLynxX_UserGuide.pdf
The installation went smootly, however, when it comes to running the command python LipidLynxX.py I have the following error:

Traceback (most recent call last):
File "/Users/ilyesabdelhamid/Documents/Lipotype/Lipid_Net_Building/LINEX2/LipidLynxX/LipidLynxX.py", line 19, in
from lynx.app import app
File "/Users/ilyesabdelhamid/Documents/Lipotype/Lipid_Net_Building/LINEX2/LipidLynxX/lynx/init.py", line 1, in
from lynx.controllers.converter import Converter
File "/Users/ilyesabdelhamid/Documents/Lipotype/Lipid_Net_Building/LINEX2/LipidLynxX/lynx/controllers/converter.py", line 19, in
from lynx.controllers.encoder import Encoder
File "/Users/ilyesabdelhamid/Documents/Lipotype/Lipid_Net_Building/LINEX2/LipidLynxX/lynx/controllers/encoder.py", line 22, in
from lynx.controllers.decoder import Decoder
File "/Users/ilyesabdelhamid/Documents/Lipotype/Lipid_Net_Building/LINEX2/LipidLynxX/lynx/controllers/decoder.py", line 21, in
from lynx.controllers.formatter import Formatter
File "/Users/ilyesabdelhamid/Documents/Lipotype/Lipid_Net_Building/LINEX2/LipidLynxX/lynx/controllers/formatter.py", line 21, in
from lynx.models.cv import CV
File "/Users/ilyesabdelhamid/Documents/Lipotype/Lipid_Net_Building/LINEX2/LipidLynxX/lynx/models/cv.py", line 20, in
from lynx.models.defaults import default_cv_file
File "/Users/ilyesabdelhamid/Documents/Lipotype/Lipid_Net_Building/LINEX2/LipidLynxX/lynx/models/defaults.py", line 32, in
default_input_rules = build_input_rules(app_cfg_info["input_rules"])
File "/Users/ilyesabdelhamid/Documents/Lipotype/Lipid_Net_Building/LINEX2/LipidLynxX/lynx/utils/params_loader.py", line 111, in build_input_rules
temp_rules = InputRules(f, logger)
File "/Users/ilyesabdelhamid/Documents/Lipotype/Lipid_Net_Building/LINEX2/LipidLynxX/lynx/models/rules.py", line 61, in init
self.rules = self.build()
File "/Users/ilyesabdelhamid/Documents/Lipotype/Lipid_Net_Building/LINEX2/LipidLynxX/lynx/models/rules.py", line 262, in build
sum_rules = self.replace_refs(sum_rules)
File "/Users/ilyesabdelhamid/Documents/Lipotype/Lipid_Net_Building/LINEX2/LipidLynxX/lynx/models/rules.py", line 144, in replace_refs
replaced_pattern = re.sub(
File "/Users/ilyesabdelhamid/opt/anaconda3/envs/envlynx/lib/python3.9/site-packages/regex/regex.py", line 278, in sub
return pat.sub(repl, string, count, pos, endpos, concurrent, timeout)
File "/Users/ilyesabdelhamid/opt/anaconda3/envs/envlynx/lib/python3.9/site-packages/regex/regex.py", line 710, in _compile_replacement_helper
is_group, items = _compile_replacement(source, pattern, is_unicode)
File "/Users/ilyesabdelhamid/opt/anaconda3/envs/envlynx/lib/python3.9/site-packages/regex/_regex_core.py", line 1737, in _compile_replacement
raise error("bad escape \%s" % ch, source.string, source.pos)
regex._regex_core.error: bad escape \s at position 37

I tried with different versions of python (3.7.13 and 3.9) but same issue.

Thank you in advance for your help.

Sincerely,
Ilyes

@IlyesAbdelhamid IlyesAbdelhamid added the bug Something isn't working label Aug 2, 2022
@ZhixuNi
Copy link
Collaborator

ZhixuNi commented Aug 3, 2022

Hi!

I think it is not the source code issue.
It looks like some rules in json format got broken or have issues in some regular expression strings.

Did you modify some of the rules?

Can you colon again a fresh new LipidLynxX and run the demo in the same python env?

Best,

Ni

@IlyesAbdelhamid
Copy link
Author

Hello,

Thank you for the prompt reply. A colleague of mine followed the same procedure and got the same error as me.
I did not change anything but in reinstalling again I noticed these following errors that I missed last time:
ERROR: spyder 4.0.1 requires pyqt5<5.13; python_version >= "3", which is not installed.
ERROR: spyder 4.0.1 requires pyqtwebengine<5.13; python_version >= "3", which is not installed.
ERROR: pytest-astropy 0.8.0 requires pytest-cov>=2.0, which is not installed.
ERROR: pytest-astropy 0.8.0 requires pytest-filter-subpackage>=0.1, which is not installed.
ERROR: spyder 4.0.1 has requirement jedi==0.14.1, but you'll have jedi 0.18.1 which is incompatible.
ERROR: python-language-server 0.31.7 has requirement jedi<0.16,>=0.14.1, but you'll have jedi 0.18.1 which is incompatible.
ERROR: nbformat 5.4.0 has requirement traitlets>=5.1, but you'll have traitlets 4.3.3 which is incompatible.
ERROR: fastapi 0.79.0 has requirement starlette==0.19.1, but you'll have starlette 0.13.6 which is incompatible.

Sincerely,
Ilyes

@IlyesAbdelhamid
Copy link
Author

Hello,

I fixed this issue by modifying the requirements.txt with a recent regex version (modification in bold):

aiofiles>=0.5.0
aiohttp>=3.6.2
click>=7.1.2
click-spinner>=0.1.10
fastapi>=0.61.1
jsonschema==3.2.0
jupyter==1.0.0
ipython>=7.18.1
ipywidgets>=7.5.1
natsort==7.0.1
nbformat>=5.0.7
numpy>=1.19.2
openpyxl>=3.0.5
pandas>=1.1.2
pydantic>=1.6.1
pytest>=6.1.0
python-multipart>=0.0.5
regex==2022.3.2
requests>=2.24.0
starlette==0.13.6
typer>=0.3.2
uvicorn>=0.12.0
xlrd>=1.2.0
xlwt>=1.3.0
pyzmq>=19.0.2

@ZhixuNi
Copy link
Collaborator

ZhixuNi commented Aug 13, 2022

Hi @IlyesAbdelhamid !
many thanks for the feedback!

Sorry I was on parental leave and was not able to respond in time.

many thanks!

@ZhixuNi ZhixuNi closed this as completed Aug 13, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants