Python Forum
can't assign to literal error in pycharm
Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
can't assign to literal error in pycharm
#1
class Flee(Action):
    def __init__(self, method: object, name: object, hotkey: object, kwargs: object) -> object:
        """

        :rtype: object
        """
        super().__init__(method, name, hotkey, kwargs)
        super().__init(method=player.Player.)not, name= "Flee", hotkey= 'f')
Can't assign to literal on line 6
Reply
#2
You should provide fully-runnable code that reproduces the issue. You should leave out things like the docstring (and maybe even the annotations, especially if they're just object) to keep it as minimal as possible.

Also, on line 8 that's clearly not legal syntax.
Reply
#3
try backing your triple quotation marks back to your object on line 5
Reply


Possibly Related Threads…
Thread Author Replies Views Last Post
  Pycharm error zuri 1 471 Nov-01-2023, 03:38 PM
Last Post: deanhystad
  Pandas - error when running Pycharm, but works on cmd line zxcv101 1 1,356 Jun-18-2022, 01:09 PM
Last Post: snippsat
  PyCharm Error? coder_sw99 4 1,987 Sep-24-2021, 06:16 PM
Last Post: Yoriz
  Keep getting Session management error when running imshow in pycharm pace 0 2,090 Mar-25-2021, 10:06 AM
Last Post: pace
  REGEX Install Error in PyCharm charlesauspicks 1 2,759 May-14-2020, 08:10 PM
Last Post: buran
  invalid literal for int() with base 10: '' mrsenorchuck 5 5,416 Apr-29-2020, 05:48 AM
Last Post: markfilan
  Traceback error in PyCharm but not in other IDEs? devansing 7 6,337 Mar-05-2020, 11:27 AM
Last Post: buran
  Error in importing package in pycharm fullstop 0 2,336 Dec-12-2019, 04:03 PM
Last Post: fullstop
  Syntax Error EOL while scanning string literal intjuma 0 2,481 Jun-28-2019, 01:56 AM
Last Post: intjuma
  Weird error in pycharm TheRedFedora 1 2,653 Mar-11-2018, 09:01 PM
Last Post: Larz60+

Forum Jump:

User Panel Messages

Announcements
Announcement #1 8/1/2020
Announcement #2 8/2/2020
Announcement #3 8/6/2020