Comments you submit will be routed for moderation. If you have an account, please log in first.
Modify

Ticket #460 (closed defect: fixed)

Opened 18 months ago

Last modified 18 months ago

"resname undefined error" when using -r/--resource option

Reported by: Maarten Damen <m.damen@…> Owned by: htgoebel
Priority: normal Milestone:
Component: PyInstaller Version: develop
Severity: normal Keywords:
Cc:

Description (last modified by htgoebel) (diff)

In the latest trunk version (and maybe before) the --resource option is broken. There are a few obvious typos which I was able to fix, but I ran into more issues later on. The typos are in the Build.py file:

                if len(res) > 1:
                    restype = res[1]
                else:
                    restype = None
                if len(res) > 2:
                    resname = res[2]
                else:
                    restype = None
                if len(res) > 3:
                    reslang = res[3]
                else:
                    restype = None

This causes a resname undefined error. After fixing this issue (by renaming the redundant restype assignments), I ran into the following issue:

File "C:\Tools\pyinstaller\PyInstaller?\utils\winresource.py", line 131, in _GetResources

if types: types = set(types)

TypeError?: unhashable type: 'list'

Not sure how this is meant to be functioning, I had a deep dive in the code. But it would be nice if someone from the PyInstaller? dev team could have a look at this issue.

Attachments

Change History

comment:1 Changed 18 months ago by htgoebel

  • Owner changed from matysek to htgoebel
  • Status changed from new to assigned
  • Description modified (diff)

comment:2 Changed 18 months ago by htgoebel

Part 1 (the typos) is fixed in r1782.

For part 2 please update to current trunk, retry and post the traceback (last 5 entries should be enough).

comment:3 Changed 18 months ago by htgoebel

  • Summary changed from -r/--resource option broken to "resname undefined error" when using -r/--resource option

comment:4 Changed 18 months ago by htgoebel

  • Status changed from assigned to closed
  • Resolution set to fixed

now answer, I assume this is fixed thus.

View

Add a comment

Modify Ticket

Action
as closed
The resolution will be deleted. Next status will be 'reopened'
Author


E-mail address and user name can be saved in the Preferences.

 
Note: See TracTickets for help on using tickets.