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

re.Match error #3

Closed
drdhaval2785 opened this issue Feb 2, 2022 · 5 comments
Closed

re.Match error #3

drdhaval2785 opened this issue Feb 2, 2022 · 5 comments

Comments

@drdhaval2785
Copy link

  • Python Interface to Cologne Digital Sanskrit Lexicon (CDSL) version: 0.1.9
  • Python version: 3.6.9
  • Operating System: Bodhi Linux 6

Description

I tried to run the example given in the docs.

What I Did

>>> results = CDSL.MW.search("राम")
Traceback (most recent call last):
  File "<stdin>", line 1, in <module>
  File "/home/dhaval/.local/lib/python3.6/site-packages/pycdsl/pycdsl.py", line 281, in search
    for result in search_query
  File "/home/dhaval/.local/lib/python3.6/site-packages/peewee.py", line 6923, in __iter__
    self.execute()
  File "/home/dhaval/.local/lib/python3.6/site-packages/peewee.py", line 1911, in inner
    return method(self, database, *args, **kwargs)
  File "/home/dhaval/.local/lib/python3.6/site-packages/peewee.py", line 1982, in execute
    return self._execute(database)
  File "/home/dhaval/.local/lib/python3.6/site-packages/peewee.py", line 2155, in _execute
    cursor = database.execute(self)
  File "/home/dhaval/.local/lib/python3.6/site-packages/peewee.py", line 3172, in execute
    sql, params = ctx.sql(query).query()
  File "/home/dhaval/.local/lib/python3.6/site-packages/peewee.py", line 614, in sql
    return obj.__sql__(self)
  File "/home/dhaval/.local/lib/python3.6/site-packages/peewee.py", line 2424, in __sql__
    ctx.literal(' WHERE ').sql(self._where)
  File "/home/dhaval/.local/lib/python3.6/site-packages/peewee.py", line 614, in sql
    return obj.__sql__(self)
  File "/home/dhaval/.local/lib/python3.6/site-packages/peewee.py", line 1483, in __sql__
    .sql(self.rhs))
  File "/home/dhaval/.local/lib/python3.6/site-packages/peewee.py", line 618, in sql
    return self.sql(Value(obj))
  File "/home/dhaval/.local/lib/python3.6/site-packages/peewee.py", line 614, in sql
    return obj.__sql__(self)
  File "/home/dhaval/.local/lib/python3.6/site-packages/peewee.py", line 1383, in __sql__
    return ctx.value(self.value, self.converter)
  File "/home/dhaval/.local/lib/python3.6/site-packages/peewee.py", line 630, in value
    value = self.state.converter(value)
  File "/home/dhaval/.local/lib/python3.6/site-packages/pycdsl/models.py", line 63, in db_value
    return to_internal(value)
  File "/home/dhaval/.local/lib/python3.6/site-packages/pycdsl/models.py", line 36, in to_internal
    if isinstance(matchobj_or_str, re.Match):
AttributeError: module 're' has no attribute 'Match'
@hrishikeshrt
Copy link
Owner

Package requires Python >= 3.7

@drdhaval2785
Copy link
Author

Any chances of reducing python version requirements?

@hrishikeshrt
Copy link
Owner

There are certain improvements to re and cmd modules in 3.7 which might make it hard. I will try, however.

@drdhaval2785
Copy link
Author

If it is non-trivial, please do not try extra. I will update my python.

drdhaval2785 added a commit to drdhaval2785/PyCDSL that referenced this issue Feb 4, 2022
@hrishikeshrt
Copy link
Owner

The piece of code that used re.Match no longer exists since 428d6a0
I didn't encounter this error in 3.6.13. Thus, I am closing this. Please let me know if you still encounter the error.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants