Skip to main content
The 2024 Developer Survey results are live! See the results

All Questions

Tagged with
0 votes
0 answers
24 views

TypeError: Unhashable Type: 'list' in pytest, selenium

`Hi, I am running the following code and getting the error as Typeerror: Unhashable type: list Could anyone help on what am i doing wrong here? from selenium import webdriver from selenium.webdriver....
MRA's user avatar
  • 13
0 votes
1 answer
32 views

Type infrencing in Kotlin lists

I have 2 lists, one called mod: listOf("Money", 1) And one called splitSave which is a 113 item long list of strings. I am trying to access the index of the splitSave list based on the one ...
Landon Kuehner's user avatar
0 votes
0 answers
20 views

store type as variable and use in list<T> c#? [duplicate]

I am trying to store a type as a variable so that I can make a List object with a few different possible types without hard coding them all. My code basically looks like this: using System; using ...
gegb1912's user avatar
0 votes
0 answers
28 views

What can I do when getting "type 'List<String>' is not a subtype of type 'String' in type cast" in flutter when i want to output list of values?

i have the error of "type 'List' is not a subtype of type 'String' in type cast" when ever i pass data of summary question widget to the result screen widget i was expecting to view the ...
Abduweli Abdiaziz's user avatar
0 votes
2 answers
53 views

Read list from .txt-file and referring to entries

I am new to programming and am trying to write a card game using python. I have some problems: I am reading in a decklist from a .txt-file like this: 2,Card001,1 2,Card002,2 2,Card003,3 I am trying ...
Dirk F.'s user avatar
-1 votes
3 answers
71 views

Possible to use python native lists to replace array altogether? [closed]

I come from PHP background so i am very used to arrays with key->value pairs e.g. array[0] = "One" array[1] = "Two" array[3] = "Three" Then i could unset(array[2]) ...
Roman Toasov's user avatar
0 votes
1 answer
37 views

unexpected conversion <list> of bytes to <bytes> in python

I can't figure out how to easy feed list of bytes to 'bytes' type. Although I make list be feeded by "for" loop. And that list suddenly transformed to 'bytes' class too. my code below: ...
pingburner's user avatar
-1 votes
1 answer
908 views

Type "str" cannot be assigned to type "type[str]"

The method is: def lengthOfLongestSubstring(self, s: str) -> int: stringList = list(s) countList = [int] current = [str] actualCounting = 1 for e1 in ...
Gabriel Monteiro Silva's user avatar
1 vote
1 answer
37 views

Prevent dart generic from accepting List of itself

I have this constructor: PuzMat.fromMatrix(List<List<T>> data) { _layers.add(data); } By mistake I passed it a List<List<List<T>>> and it just swallowed it. I want to ...
UglyBob's user avatar
  • 267
0 votes
2 answers
59 views

How do you pass and use a generic Type with a method?

In terms of the DRY principle, I'm seeking to reduce the methods below (there are other lists that need generating, so number is larger in real life): public static List<Genre> GetGenres(...
stigzler's user avatar
  • 967
0 votes
1 answer
80 views

How to assign this variable manually

Python 3 this snippet: var.execute(query) for x in var: print(x) print(type(var)) Output on console: (1, 'sarah', None, '', 0, datetime.datetime(2022, 12, 25, 16, 16, 2), 'administrator') <...
lfsegoro's user avatar
0 votes
2 answers
34 views

Search Anonymous Type List with Linq

Is there a better way to find a value in an list of anonymous types? I would like to use linq. Sub Main() Dim listOfAnonymousTypes = { New With {.Name = "John", .Age = 30}, ...
jocoder's user avatar
  • 85
-1 votes
1 answer
55 views

.items() reading a dictionary as a list and throwing an attribute error

I am using IN-CORE, a analysis platform for natural disasters. I am working with a Monte Carlo definition in their library (pyincore). I am using this code to run through a list of dictionary entries ...
Kat Neumann's user avatar
0 votes
1 answer
38 views

Modify JSON fields type

I have a list which contain data in JSON format: [ { "avg_cpu": " 2.080901628850305", "avg_cpu_deviation": " 0.0", ...
arturoxv's user avatar
1 vote
2 answers
79 views

How to sort a list of lists including numeric strings left to right with an arbitrary number of sorting levels in Python?

I have a list of sublists of arbitrary lengths, populated with strings, both alpha and numeric. I want to sort this list first by the first element of each sub-list, then by the second element, and so ...
Anton Bibin's user avatar

15 30 50 per page
1
2 3 4 5
34