• 02-12-2022, 13:46:31
    #1
    Merhabalar değerli forum kullanıcıları Python da bir sorunla karşı karşıyayım ücretli ücretsiz yardımcı olacak varsa whatsapp ile iletişime geçerse veya konu altında yorum yaparsa öok makbule geçer

    güncellem
    TypeError
    TypeError: string argument without an encoding
    Traceback (most recent call last)

    • File \"C:\Program Files\Python38\lib\site-packages\flask\app.py\", line 2548, in __call__

      return self.wsgi_app(environ, start_response)
    • File \"C:\Program Files\Python38\lib\site-packages\flask_socketio\__init__.py\", line 43, in __call__

      return super(_SocketIOMiddleware, self).__call__(environ,
    • File \"C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\engineio\middleware.py\", line 74, in __call__

      return self.wsgi_app(environ, start_response)
    • File \"C:\Program Files\Python38\lib\site-packages\flask\app.py\", line 2528, in wsgi_app

      response = self.handle_exception(e)
    • File \"C:\Program Files\Python38\lib\site-packages\flask\app.py\", line 2525, in wsgi_app

      response = self.full_dispatch_request()
    • File \"C:\Program Files\Python38\lib\site-packages\flask\app.py\", line 1822, in full_dispatch_request

      rv = self.handle_user_exception(e)
    • File \"C:\Program Files\Python38\lib\site-packages\flask\app.py\", line 1820, in full_dispatch_request

      rv = self.dispatch_request()
    • File \"C:\Program Files\Python38\lib\site-packages\flask\app.py\", line 1796, in dispatch_request

      return self.ensure_sync(self.view_functions[rule.endpoint])(**view_args)
    • File \"C:\Users\TOSHIBA\Desktop\***\app\base\routes.py\", line 38, in login

      user = User.query.filter_by(username=username.encode('utf-8')).first()
    • File \"C:\Program Files\Python38\lib\site-packages\sqlalchemy\orm\query.py\", line 3429, in first

      ret = list(self[0:1])
    • File \"C:\Program Files\Python38\lib\site-packages\sqlalchemy\orm\query.py\", line 3203, in __getitem__

      return list(res)
    • File \"C:\Program Files\Python38\lib\site-packages\sqlalchemy\orm\loading.py\", line 100, in instances

      cursor.close()
    • File \"C:\Program Files\Python38\lib\site-packages\sqlalchemy\util\langhelpers.py\", line 68, in __exit__

      compat.raise_(
    • File \"C:\Program Files\Python38\lib\site-packages\sqlalchemy\util\compat.py\", line 182, in raise_

      raise exception
    • File \"C:\Program Files\Python38\lib\site-packages\sqlalchemy\orm\loading.py\", line 80, in instances

      rows = [proc(row) for row in fetch]
    • File \"C:\Program Files\Python38\lib\site-packages\sqlalchemy\orm\loading.py\", line 80, in <listcomp>

      rows = [proc(row) for row in fetch]
    • File \"C:\Program Files\Python38\lib\site-packages\sqlalchemy\orm\loading.py\", line 579, in _instance

      _populate_full(
    • File \"C:\Program Files\Python38\lib\site-packages\sqlalchemy\orm\loading.py\", line 725, in _populate_full

      dict_[key] = getter(row)
    • File \"C:\Program Files\Python38\lib\site-packages\sqlalchemy\sql\sqltypes.py\", line 946, in process

      value = bytes(value)

    >python run.py
    Traceback (most recent call last):
      File "run.py", line 7, in <module>
        import flask
      File "C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\flask\__init__.py", line 14, in <module>
        from jinja2 import escape
      File "C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\jinja2\__init__.py", line 12, in <module>
        from .environment import Environment
      File "C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\jinja2\environment.py", line 25, in <module>
        from .defaults import BLOCK_END_STRING
      File "C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\jinja2\defaults.py", line 3, in <module>
        from .filters import FILTERS as DEFAULT_FILTERS  # noqa: F401
      File "C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\jinja2\filters.py", line 13, in <module>
        from markupsafe import soft_unicode
    ImportError: cannot import name 'soft_unicode' from 'markupsafe' (C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\markupsafe\__init__.py)
  • 02-12-2022, 14:06:57
    #2
    pip install markupsafe==2.0.1
  • 02-12-2022, 14:07:17
    #3
    Merhaba hocam,

    https://stackoverflow.com/questions/...rom-markupsafe

    Bu link sana yardımcı olabilir. İncelemende fayda var.
  • 02-12-2022, 14:08:53
    #4
    hesapadim adlı üyeden alıntı: mesajı görüntüle
    pip install markupsafe==2.0.1
    denedim daha önce hocam aşşağıdaki hata
    >pip install markupsafe==2.0.1
    Collecting markupsafe==2.0.1
      Using cached https://files.pythonhosted.org/packages/30/9e/4b7116f464a0151b86ce42b5185941eb74c207b38fe033f71f5e5d150356/MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl
    ERROR: werkzeug 2.2.2 has requirement MarkupSafe>=2.1.1, but you'll have markupsafe 2.0.1 which is incompatible.
    Installing collected packages: markupsafe
      Found existing installation: markupsafe 2.1.1
        Uninstalling markupsafe-2.1.1:
          Successfully uninstalled markupsafe-2.1.1
      Rolling back uninstall of markupsafe
      Moving to c:\users\toshiba\appdata\roaming\python\python38\site-packages\markupsafe-2.1.1.dist-info\
       from C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\~arkupsafe-2.1.1.dist-info
      Moving to c:\users\toshiba\appdata\roaming\python\python38\site-packages\markupsafe\
       from C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\~arkupsafe
    ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Erişim engellendi: 'c:\\program files\\python38\\Lib\\site-packages\\markupsafe'
    Consider using the `--user` option or check the permissions.
    
    WARNING: You are using pip version 19.2.3, however version 22.3.1 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
  • 02-12-2022, 14:13:23
    #5
    Beyturx adlı üyeden alıntı: mesajı görüntüle
    denedim daha önce hocam aşşağıdaki hata
    >pip install markupsafe==2.0.1
    Collecting markupsafe==2.0.1
      Using cached https://files.pythonhosted.org/packages/30/9e/4b7116f464a0151b86ce42b5185941eb74c207b38fe033f71f5e5d150356/MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl
    ERROR: werkzeug 2.2.2 has requirement MarkupSafe>=2.1.1, but you'll have markupsafe 2.0.1 which is incompatible.
    Installing collected packages: markupsafe
      Found existing installation: markupsafe 2.1.1
        Uninstalling markupsafe-2.1.1:
          Successfully uninstalled markupsafe-2.1.1
      Rolling back uninstall of markupsafe
      Moving to c:\users\toshiba\appdata\roaming\python\python38\site-packages\markupsafe-2.1.1.dist-info\
       from C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\~arkupsafe-2.1.1.dist-info
      Moving to c:\users\toshiba\appdata\roaming\python\python38\site-packages\markupsafe\
       from C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\~arkupsafe
    ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Erişim engellendi: 'c:\\program files\\python38\\Lib\\site-packages\\markupsafe'
    Consider using the `--user` option or check the permissions.
    
    WARNING: You are using pip version 19.2.3, however version 22.3.1 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    cmd'yi yönetici olarak çalıştırın deneyin

    diğer paket sorun çıkarırsa "soft_str" fonksiyonuna geçirmeniz gerekebilir kodu
  • 02-12-2022, 14:14:38
    #6
    tahsinyaman adlı üyeden alıntı: mesajı görüntüle
    Merhaba hocam,

    https://stackoverflow.com/questions/...rom-markupsafe

    Bu link sana yardımcı olabilir. İncelemende fayda var.
    Beyturx adlı üyeden alıntı: mesajı görüntüle
    denedim daha önce hocam aşşağıdaki hata
    >pip install markupsafe==2.0.1
    Collecting markupsafe==2.0.1
      Using cached https://files.pythonhosted.org/packages/30/9e/4b7116f464a0151b86ce42b5185941eb74c207b38fe033f71f5e5d150356/MarkupSafe-2.0.1-cp38-cp38-win_amd64.whl
    ERROR: werkzeug 2.2.2 has requirement MarkupSafe>=2.1.1, but you'll have markupsafe 2.0.1 which is incompatible.
    Installing collected packages: markupsafe
      Found existing installation: markupsafe 2.1.1
        Uninstalling markupsafe-2.1.1:
          Successfully uninstalled markupsafe-2.1.1
      Rolling back uninstall of markupsafe
      Moving to c:\users\toshiba\appdata\roaming\python\python38\site-packages\markupsafe-2.1.1.dist-info\
       from C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\~arkupsafe-2.1.1.dist-info
      Moving to c:\users\toshiba\appdata\roaming\python\python38\site-packages\markupsafe\
       from C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\~arkupsafe
    ERROR: Could not install packages due to an EnvironmentError: [WinError 5] Erişim engellendi: 'c:\\program files\\python38\\Lib\\site-packages\\markupsafe'
    Consider using the `--user` option or check the permissions.
    
    WARNING: You are using pip version 19.2.3, however version 22.3.1 is available.
    You should consider upgrading via the 'python -m pip install --upgrade pip' command.
    yönetici olarak çalıştırıldı şuan aşşağıdaki hatalar kaldı sadece

    >python run.py
    Traceback (most recent call last):
      File "run.py", line 7, in <module>
        import flask
      File "C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\flask\__init__.py", line 19, in <module>
        from . import json
      File "C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\flask\json\__init__.py", line 15, in <module>
        from itsdangerous import json as _json
    ImportError: cannot import name 'json' from 'itsdangerous' (C:\Users\TOSHIBA\AppData\Roaming\Python\Python38\site-packages\itsdangerous\__init__.py)
  • 02-12-2022, 15:46:23
    #7
    hesapadim adlı üyeden alıntı: mesajı görüntüle
    öncelikle cagri hocama çok teşekkür ederim cmd ekranında aldığım hatalar giderildi ve giriş ekranında bulunan hatalar çıkmaya başladı bunlarıo da güncelleme şeklinde ekledim
  • 02-12-2022, 19:31:59
    #8
    Software Developer
    Hocam bütün paketleri tek tek yüklemeyi deneyin. Bağımlılıkları tek tek freeze ile çıkartılmayınca böyle sıkıntılar çıkıyor.