Comments (15)
Sure, I just sent a message to the e-mail you have listed on your github profile.
from sas_kernel.
That sounds just as strange as half of the things we were seeing. I can't account for how that would affect ODS. If it's really the case, you can add your USER libname statement to your 'autoexec' key in your saspy configuration; it's just a string of SAS code that I'll submit for you once I establish the connection (after the ods stmt), before returning from the SASsession call. That way, you can still have user assigned automatically, but after the ods stmt.
Also, I just went through my code and found a couple places where a table was supposed to explicitly go to work, but was going to user, when user is assigned. I've fixed those (SASdata object's head() and tail()). I've pushed that out too and that will be in 4.3.2 when I build that. I don't think that's an issue you were seeing yet though.
Tom
from sas_kernel.
from sas_kernel.
I'm not sure that will really work. And since you can't set the SASsession attribute sas.HTML_Style = 'Raven'
like you can in a Python notebook, I've added an option in the config so you can change the default so that you're SAS notebook will use that style:
SAS_output_options = {'output' : 'html5', # not required unless changing any of the default
'style' : 'Raven'}
Just add the 'style' key to your SAS_output_options dict and specify the style to use. I've pushed this change to main, can you pull from there and test it out?
Thanks,
Tom
from sas_kernel.
Tom,
I now have the latest version of saspy (4.3.1) and made the change to the SAS_output_options dict as provided above.
For sas_kernel I am now getting an "ERROR: Unable to establish ODS Graphics context."
A basic command like the following just hangs:
proc print data=sashelp.cars(obs=25);run;
Using saspy directly in a Python notebook I don't see any error message, but the sas.HTML_Style attribute is still 'HTMLBlue' and the output that I get still looks like HTMLBlue:
c = sas.submit("""proc print data=sashelp.cars(obs=10);run;""")
HTML(c['LST'])
Happy to provide more info. Thanks for your help.
Edwin
from sas_kernel.
Hey, did you pull the code from main or just do a pip install? I only pushed this change to my saspy repo, I haven't built it into a new release (I just built 4.3.1 yesterday).
I don't know why you would be getting an error in the SAS notebook. Can't imagine what could be causing that. Did something else change? Did you restart the notebook after installing saspy?
You can install from main like this (do an uninstall first):
pip uninstall -y saspy
pip install git+https://[email protected]/sassoftware/saspy.git
from sas_kernel.
Or, did you get main, and whatever you specified wasn't found or something? Can you show your config and the log after running each of those in their notebooks? BTW, in saspy you can simple run
sas.submitLST("proc print data=sashelp.cars(obs=10);run;")
which will render the output for you, if there is any, else render the log. Easier than the 2 steps with just submit().
from sas_kernel.
Did a fresh install (new conda environment) and saspy is working (at least the SASsession approach).
The error message also shows up when I try to use the %%SAS magic.
from sas_kernel.
Ok, it seems you have the code. That magic isn't very useful in that it starts it's own session and you can't really make it show the SAS LOG so you can see what was really there. Can you try that in a SAS notebook and it ought to show the log from submitting the proc, so we can see the log for that instead of only one line.
from sas_kernel.
This appears to be the relevant portion of the %showFullLog. I'm not sure what is going on because the SAS notebook was working fine (same server) earlier. I'm running sas_kernel 2.4.12 (also fresh install, via pip+git).
2 options svgtitle='svgtitle'; options validvarname=any validmemname=extend;
------------
36
WARNING 36-12: SAS option VALIDVARNAME is restricted by your Site Administrator
and cannot be updated.
2 ! options svgtitle='svgtitle'; options validvarname=any validmemname=extend;
------------
36
2 ! ods graphics on;
WARNING 36-12: SAS option VALIDMEMNAME is restricted by your Site Administrator
and cannot be updated.
ERROR: Unable to establish ODS Graphics context.
from sas_kernel.
Ohhhh, well that's new. So, then, what happens when you submit other code after that initial error? Those statements are a one time thing when I first establish a connection. In the SAS notebook, what happens if you try another line of code after?
from sas_kernel.
Since it worked in saspy, and the SAS kernel just calls sas.submit(), I expect the next thing you submit will work since it worked in saspy. If you look at the log in saspy you ought to see the same error in the log; it just didn't keep the next thing from running.
print(sas.saslog())
from sas_kernel.
From the SAS notebook I can't run any other code (just hangs). Interestingly, I get the warnings from saspy, but no ODS Graphics Error. From print(sas.saslog())
:
2 options svgtitle='svgtitle'; options validvarname=any validmemname=extend;
------------
36
WARNING 36-12: SAS option VALIDVARNAME is restricted by your Site Administrator
and cannot be updated.
2 ! options svgtitle='svgtitle'; options validvarname=any validmemname=extend;
------------
36
2 ! ods graphics on;
WARNING 36-12: SAS option VALIDMEMNAME is restricted by your Site Administrator
and cannot be updated.
from sas_kernel.
have you go time for a teams call so I can actually see what you're seeing? This is really odd.
from sas_kernel.
Ok so it appears the cause of the error is a bug in SAS 9.4 itself:
Removing the USER library definition in my autoexec.sas solves the problem (works both with saspy and sas_kernel).
Setting the USER library after turning on ODS Graphics does not "break" ODS Graphics either. So I think the latest saspy (4.3.1) solves my issue without creating any new errors.
from sas_kernel.
Related Issues (20)
- Unable to write to template store with proc template HOT 1
- If Python was installed with elevated privs, the package needs them too
- I can't get the result of proc step!!! HOT 6
- sas_kernel in hydrogen HOT 5
- No residual panels for PROC MIXED in Jupter Notebook HOT 3
- SAS Kernel in a terminal HOT 5
- Windows install instructions are outdated HOT 19
- SAS NBextensions for Jupyter Lab HOT 9
- "The system cannot find the file specified" HOT 8
- SAS in Linux/Jupyter Hub Environment HOT 6
- Unable to communicate to SAS server from Jupiterhub HOT 4
- No extension provided HOT 3
- STDIO over SSH, cell output may contains extra HTML text HOT 8
- sas_kernel 2.4.6 cannot be seen in jupyter-lab after being installed successfully HOT 2
- SAS kernel failing inside Docker container with Python 3.9 HOT 18
- TypeError printed when running SAS code using the SAS Kernel. HOT 4
- module 'saspy' has no attribute 'SASsession' HOT 1
- Support multiple output formats HOT 5
- Cannot install sas_kernel HOT 24
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 sas_kernel.