# NameError: name ‘PUINT’ is not defined

**URL:** <https://discourse.psychopy.org/t/nameerror-name-puint-is-not-defined/4054>\
**Category:** Coding\
**Tags:** screen\
**Created:** [March 4, 2018, 7:22pm UTC](https://discourse.psychopy.org/t/nameerror-name-puint-is-not-defined/4054 "2018-03-04T19:22:18Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![VEshelby1](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/veshelby1/32/8163_2.png) [@VEshelby1](https://discourse.psychopy.org/u/VEshelby1)\
**Post date:** [March 4, 2018, 7:22pm UTC](https://discourse.psychopy.org/t/nameerror-name-puint-is-not-defined/4054/1 "2018-03-04T19:22:18Z")

</div>

I downloaded the package as recommended according to the website. I have checked out the other thread ([link](https://discourse.psychopy.org/t/error-with-bits-box-on-1-85-3b/2947/7)) and have attempted the recommended fixes from there. Still no response.

Using PC (windows 10), Virtual IDE: Pycharm, python 2.7

The code:  
from psychopy import visual,core, event  
window = visual.Window(size=(400,400),fullscr=1)

^  
It flags up visual ( pyglet), and the error traceback is outputted in the console below:

> C:\Python27\python.exe C:/Users/Tolly/PycharmProjects/parsonCue/main.py  
> Traceback (most recent call last):  
> File “C:/Users/Tolly/PycharmProjects/parsonCue/main.py”, line 1, in   
> from psychopy import visual,core, event  
> File “C:\Python27\lib\site-packages\psychopy\visual\__init_\_.py”, line 17, in   
> from .window import Window, getMsPerFrame, openWindows  
> File “C:\Python27\lib\site-packages\psychopy\visual\window.py”, line 57, in   
> from psychopy import core, platform\_specific, logging, prefs, monitors, event  
> File “C:\Python27\lib\site-packages\psychopy\event.py”, line 44, in   
> from pyglet.window.mouse import LEFT, MIDDLE, RIGHT  
> File “C:\Python27\lib\site-packages\pyglet\window\__init_\_.py”, line 1769, in   
> from pyglet.window.win32 import Win32Window as Window  
> File “C:\Python27\lib\site-packages\pyglet\window\win32\__init_\_.py”, line 59, in   
> from pyglet.canvas.win32 import Win32Canvas  
> File “C:\Python27\lib\site-packages\pyglet\canvas\__init_\_.py”, line 99, in   
> from pyglet.canvas.win32 import Win32Display as Display  
> File “C:\Python27\lib\site-packages\pyglet\canvas\win32.py”, line 7, in   
> from pyglet.libs.win32 import \_kernel32, _user32, types, constants  
> File "C:\Python27\lib\site-packages\pyglet\libs\win32\_init_.py", line 237, in   
> \_user32.GetRawInputData.argtypes = [HRAWINPUT, UINT, LPVOID, PUINT, UINT]  
> NameError: name ‘PUINT’ is not defined

Process finished with exit code 1

My attempts thus far:  
I have downgraded pyglet as recommended [here](https://bitbucket.org/pyglet/pyglet/issues/170/nameerror-name-puint-is-not-defined) and then reupgraded it, and tested it against psychopy 1.9, 1.85, and 1.84 and failing to get different results.

---

<div class="post-metadata">

**Author:** ![jon](https://sea2.discourse-cdn.com/flex002/user_avatar/discourse.psychopy.org/jon/32/22_2.png) [@jon](https://discourse.psychopy.org/u/jon)\
**Post date:** [March 5, 2018, 10:00am UTC](https://discourse.psychopy.org/t/nameerror-name-puint-is-not-defined/4054/2 "2018-03-05T10:00:14Z")

</div>

Beyond reiterating your options from below, I don’t know what to say. Can’t you just install Standalone PsychoPy?

> [@Error with Bits++ box on 1.85.3b](https://discourse.psychopy.org/t/error-with-bits-box-on-1-85-3b/2947/7):
>
> Yes, your options are: Use PsychoPy standalone (where I’ve patched the problem in the pyglet lib) Use your own installation of pyglet (e.g. anaconda) and then patch it yourself as I describe above Install pyglet from source (from the bitbucket repository) because it has already been fixed, just not released Wait for a pyglet release that includes it (1.4.1?) downgrade to 1.2.4
