Comments (5)
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.
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.
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.
f-string fixed since 80245b2.
from clyngor.
Can you test again for that bug, and if it's fixed, closing that issue ?
from clyngor.
Related Issues (20)
- Add conda package HOT 4
- Access to atoms dict through name and arity
- Support for grounding and solving as separate operations HOT 1
- Easy installation of clingo binary HOT 1
- Clingo binary path should be gotten from environment variables
- __str__ method of Atom in as_pyasp fails if arguments are of different types HOT 1
- Autodetect when it is necessary to use careful parsing.
- atoms starting with underscore are not carefully parsed
- How to get info on number of models generated? HOT 6
- A model for clingo's statistics
- lack of import as_pyasp HOT 1
- When running python file: mapping[f'{pred}/{len(args)}'].add(args) HOT 2
- Missing license file HOT 5
- AttributeError: module 'clingo' has no attribute 'Control' HOT 4
- TypeError: solve() got an unexpected keyword argument 'async' HOT 9
- clyngor: when using clingo module, stderr is dumped to stdout
- Keep statistics when UNSATISFIABLE HOT 1
- Parsing answer difficulties when python clingo is installed
- Atom as string and first arg only are colliding HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
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.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from clyngor.