Coder Social home page Coder Social logo

Comments (5)

Aluriak avatar Aluriak commented on August 26, 2024

Can you provide information about your OS, python version, packaging system (anaconda i guess ?), and the minimal working python code that produces the error ?

Besides there are other bugs […] I manually corrected each raise error.

Can you show them, or PR them ?

from clyngor.

harshitpatel96 avatar harshitpatel96 commented on August 26, 2024

Sure, here are the syntax errors that I am getting when I install clyngor and import it.

I just removed f from the raise ValueError line and then I was able to import it. But later I got the error that I mentioned in my initial query. I was not able to correct that. The error is given below

Traceback (most recent call last):

File "C:\Users\HARSHIT\Anaconda3\lib\site-packages\IPython\core\interactiveshell.py", line 2862, in run_code
exec(code_obj, self.user_global_ns, self.user_ns)

File "", line 1, in
import clyngor

File "D:\NCSU\Semester_1\CSC503 - Computational Applied Logic\Project\clyngor_init_.py", line 4, in
from clyngor.utils import ASPSyntaxError, ASPWarning, parse_clingo_output, clingo_value_to_python, with_clingo_bin, opt_models_from_clyngor_answers, answer_set_to_str, answer_set_from_str

File "D:\NCSU\Semester_1\CSC503 - Computational Applied Logic\Project\clyngor\utils.py", line 147
raise ValueError(f"Python value '{repr(val)}' of type {type(val)} is not convertible in ASP.")
^
SyntaxError: invalid syntax

from clyngor.

Aluriak avatar Aluriak commented on August 26, 2024

Sounds like your installation does not support f-string, introduced in python 3.6.

Since i tried to get clyngor work for lesser versions, i should fix that, thanks for pointing that up.
Until then, update your python installation, remove all f-strings, or, since 80245b2, use upstream version.

from clyngor.

Aluriak avatar Aluriak commented on August 26, 2024

f-string fixed since 80245b2.

from clyngor.

Aluriak avatar Aluriak commented on August 26, 2024

Can you test again for that bug, and if it's fixed, closing that issue ?

from clyngor.

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.