Skip to content

Fixed error of run_policy.py with python 3.6#6

Open
kirk86 wants to merge 1 commit intomodestyachts:masterfrom
kirk86:master
Open

Fixed error of run_policy.py with python 3.6#6
kirk86 wants to merge 1 commit intomodestyachts:masterfrom
kirk86:master

Conversation

@kirk86
Copy link

@kirk86 kirk86 commented Oct 9, 2018

Fixed error of run_policy.py with python 3.6, lin_policy.items() returns ItemsView in python 3.6, converting to list is not allowed, thus one can use lin_policy.f.arr_0 or lin_policy[lin_policy.files[0]].

returns ItemsView in python 3.6, converting to list is not allowed
@dryanguasr
Copy link

It is not hard to solve. I added the list casting to the lin_policy object (around line 23) and then it worked:

lin_policy = np.load(args.expert_policy_file)
lin_policy = list(lin_policy.items())
lin_policy = lin_policy[0][1]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants