Replit.nix says unmatched parentheses but I haven't touched it

Here’s the error:

nix error: building nix env: exit status 1
...
syntax error, unexpected ')', at /home/runner/.../replit.nix:3:22

and the .replit.nix file. Note that on line 3, the parens are closed:
This file was generated automatically.

{ pkgs }: {
  deps = [
    pkgs.pytest.main()
    pkgs.python310Full
    pkgs.replitPackages.prybar-python310
    pkgs.replitPackages.stderred
  ];
  env = {
    PYTHON_LD_LIBRARY_PATH = pkgs.lib.makeLibraryPath [
      # Needed for pandas / numpy
      pkgs.stdenv.cc.cc.lib
      pkgs.zlib
      # Needed for pygame
      pkgs.glib
      # Needed for matplotlib
      pkgs.xorg.libX11
    ];
    PYTHONHOME = "${pkgs.python310Full}";
    PYTHONBIN = "${pkgs.python310Full}/bin/python3.10";
    LANG = "en_US.UTF-8";
    STDERREDBIN = "${pkgs.replitPackages.stderred}/bin/stderred";
    PRYBAR_PYTHON_BIN = "${pkgs.replitPackages.prybar-python310}/bin/prybar-python310";
  };
}

Anyone have any idea what’s going on?

Problem started when I deleted

import pytest
pytest.main()

in my main.py

I’ve since added them back in, but the error remains.
Is this some kind of cache refresh error?
Suggestions?

Remove the pkgs.pytest.main() line from replit.nix.

4 Likes

Thanks.

Why did Replit add that line to the replit.nix file?

You probably typed that when it was asking for you to choose what package to use for something.

1 Like

This topic was automatically closed 7 days after the last reply. New replies are no longer allowed.