maxWiklund / nuke_parser

Nuke script (.nk) parser in python
Apache License 2.0
14 stars 0 forks source link

OverflowError: Python int too large to convert to C long #1

Open herronelou opened 4 days ago

herronelou commented 4 days ago

Hi @maxWiklund , really interesting repo. I'm working on getting it spun up to do some testing, and ran into this error:

Traceback (most recent call last):
  File "...\nkview\app.py", line 162, in run
    win = NkViewMainWindow()
  File "...\nkview\app.py", line 68, in __init__
    self._node_graph_view = NukeNodeGraphWidget(self)
  File "...\nkview\graph_view.py", line 312, in __init__
    self._view = _NkGraphView(self)
  File "...\nkview\graph_view.py", line 66, in __init__
    self.setSceneRect(INT_MIN / 2, INT_MIN / 2, INT_MAX, INT_MAX)
OverflowError: Python int too large to convert to C long

I don't think I've changed any line numbers, although I did have to make a few minor tweaks here and there to get this working in Rez as 2 independent packages.

I'm running on this on Windows 10 with PySide2, I haven't tried with Pyside6 yet as I don't have that fully setup yet.

I'm going around that issue by changing the values of INT_MAX and INT_MIN, but I thought I'd report it regardless.

Cheers.

maxWiklund commented 4 days ago

Hi @herronelou, What python version are you using? What are the issues with rez (is it that I declare the namespace nuke_parser)? I'm using an in-house package manager at work.

herronelou commented 4 days ago

I'm on python 3.9.13 in this case.

Regarding Rez, not so much of a problem as much as a choice, I want to have this as 2 separate packages, so that I can use the parser without introducing Qt dependencies, and I wanted them to each have their namespace, so I change the structure a bit so that the imports are just nkview instead of nuke_parser.nkview.

I don't need you to make any changes to your repo for my namespace changes, it was just in case I may have changed a line number for the stack trace above.