# How to attach a simple Sage script in a Sage Jupyter notebook

**My two PCs' configurations:** Windows 8.1, Windows 10

**Sage version:** SageMath 8.3, windows installer 0.4

github.com/sagemath/sage-windows/releases

I want to use a Sage script in a Sage Jupyter Notebook (Jupyter with Sage as a kernel).

I have tried the following procedure:

- I put a Sage code (definition of a function) in text file named Script.sage.
- In a Jupyter notebook I tried command attach('Script.Sage')
- I got a usage error: UsageError: Invalid GUI request 'sage', valid ones are:[None, 'widget', 'qt5', 'qt', 'nbagg', 'osx', 'gtk', 'qt4', 'gtk3', 'notebook', 'tk', 'ipympl', 'inline', 'asyncio', 'wx']

Some advice about where is a problem? What to do? Or is there another procedure how to use a Sage code written in separate files in a Jupyter notebook?

The issue you're getting with

`attach()`

looks like a bit of a bug though. I don't think it's particular to Windows either. Even if it is "expected" from a coding perspective it is certainly unexected and unhelpful from a user perspective.