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

(python): cannot use show() in hyperquery #1856

Open
greyscaled opened this issue Sep 28, 2023 · 4 comments
Open

(python): cannot use show() in hyperquery #1856

greyscaled opened this issue Sep 28, 2023 · 4 comments
Labels
bug 🐛 Something isn't working question ❔ Community and user questions

Comments

@greyscaled
Copy link
Contributor

I have a simple hyperquery notebook with two cells:

pip install glaredb
import glaredb

con = glaredb.connect()
con.sql("select 'hello from hyperquery'").show()

I get the following error:


NameError Traceback (most recent call last)
Cell In [3], line 4
1 import glaredb
3 con = glaredb.connect()
----> 4 con.sql("select 'hello from hyperquery'").show()

File :1

NameError: name 'print' is not defined

@greyscaled greyscaled added the bug 🐛 Something isn't working label Sep 28, 2023
@greyscaled greyscaled changed the title (python): cannot use .show() in hyperquery (python): cannot use show() in hyperquery Sep 28, 2023
@vrongmeal
Copy link
Contributor

It seems like you can't really print in hyperquery. Can you try running a simple print('hello')?

We might want to add a to_string method and the show method to just call print around it.

@greyscaled greyscaled added the question ❔ Community and user questions label Sep 28, 2023
@greyscaled
Copy link
Contributor Author

Can you try running a simple print('hello')?

print("hello world")

works as expected:

print-hello-world

@omerimzali
Copy link

Hi, @greyscaled
I don't get any error for this lines below, So I thought this issue is casued by pyprint
image

For .show() method why do you use pyprint? Can't we directly print console output with rust ( println! directly)? Because the aim is to print something to console. I can create a PR if it's okay to you?

@vrongmeal
Copy link
Contributor

Hey @omerimzali ! We actually did have println! but updated because it did not work on Google Colab. See #1511

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug 🐛 Something isn't working question ❔ Community and user questions
Projects
None yet
Development

No branches or pull requests

3 participants