Skip ke Konten
Menu
Pertanyaan ini telah diberikan tanda
2 Replies
1044 Tampilan

Hello forum members,

I hope you can help me with a Python programming issue I'm currently facing. I'm encountering the following error:

ValueError: Expected a list of commands but got 'False'


This error is preventing my code from running successfully, and I'm unsure about how to address it. I've checked my code, but I'm unable to identify the root cause. 

I suspect that the issue might be related to the data I'm working with, but without more information, I'm finding it challenging to pinpoint the problem.

Avatar
Buang
Jawaban Terbai
  • This ValueError can also occur when reading files. Let's say we have records of student test results in a text file, and we want to read the data to conduct further analysis.
  • The Python ValueError is raised when the wrong value is assigned to an object. This can happen if the value is invalid for a given operation, or if the value does not exist. For example, if a negative integer is passed to a square root operation, a ValueError is raised.
  • Unpacking refers to retrieving values from a list and assigning them to a list of variables. This error occurs when the number of variables doesn't match the number of values. As a result of the inequality, Python doesn't know which values to assign to which variables, causing us to get the error.


Avatar
Buang
Penulis

Okay, I will check accordingly. Will let you know if this was helpful.

Jawaban Terbai

Hi,
If you check the odoo log, you can easily locate the line of code that causing the issue. If you can check the log and share the corresponding code line, it is easy to help.

May be putting a default value or adding an if condition will solve your issue.

Thanks

Avatar
Buang
Post Terkait Replies Tampilan Aktivitas
0
Feb 24
793
1
Jan 24
1631
1
Des 23
4473
0
Mei 22
2121
2
Jun 23
2045