{"action":"created","issue":{"url":"https://api.github.com/repos/sympy/sympy/issues/9539","labels_url":"https://api.github.com/repos/sympy/sympy/issues/9539/labels{/name}","comments_url":"https://api.github.com/repos/sympy/sympy/issues/9539/comments","events_url":"https://api.github.com/repos/sympy/sympy/issues/9539/events","html_url":"https://github.com/sympy/sympy/issues/9539","id":89121890,"number":9539,"title":"diophantine(6*k + 9*n + 20*m - x) gives TypeError: unsupported operand type(s) for *: 'NoneType' and 'Symbol'","user":{"login":"asmeurer","id":71486,"avatar_url":"https://avatars.githubusercontent.com/u/71486?v=3","gravatar_id":"","url":"https://api.github.com/users/asmeurer","html_url":"https://github.com/asmeurer","followers_url":"https://api.github.com/users/asmeurer/followers","following_url":"https://api.github.com/users/asmeurer/following{/other_user}","gists_url":"https://api.github.com/users/asmeurer/gists{/gist_id}","starred_url":"https://api.github.com/users/asmeurer/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/asmeurer/subscriptions","organizations_url":"https://api.github.com/users/asmeurer/orgs","repos_url":"https://api.github.com/users/asmeurer/repos","events_url":"https://api.github.com/users/asmeurer/events{/privacy}","received_events_url":"https://api.github.com/users/asmeurer/received_events","type":"User","site_admin":false},"labels":[],"state":"open","locked":false,"assignee":null,"milestone":null,"comments":9,"created_at":"2015-06-17T20:45:56Z","updated_at":"2015-07-16T07:09:45Z","closed_at":null,"body":"```\r\nIn [15]: diophantine(6*k + 9*n + 20*m - x)\r\n---------------------------------------------------------------------------\r\nTypeError                                 Traceback (most recent call last)\r\n<ipython-input-15-234fff11d03b> in <module>()\r\n----> 1 diophantine(6*k + 9*n + 20*m - x)\r\n\r\n/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/solvers/diophantine.py in diophantine(eq, param)\r\n     85\r\n     86         var_t, jnk, eq_type = classify_diop(base)\r\n---> 87         solution = diop_solve(base, param)\r\n     88\r\n     89         if eq_type in [\"linear\", \"homogeneous_ternary_quadratic\", \"general_pythagorean\"]:\r\n\r\n/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/solvers/diophantine.py in diop_solve(eq, param)\r\n    173\r\n    174     if eq_type == \"linear\":\r\n--> 175         return _diop_linear(var, coeff, param)\r\n    176\r\n    177     elif eq_type == \"binary_quadratic\":\r\n\r\n/Users/aaronmeurer/Documents/python/sympy/sympy/sympy/solvers/diophantine.py in _diop_linear(var, coeff, param)\r\n    402         for v in var[2:]:\r\n    403             sol_x, sol_y  = base_solution_linear(-coeff[v], a, b)\r\n--> 404             X.append(sol_x*v)\r\n    405             Y.append(sol_y*v)\r\n```\r\n\r\nIf I reorder the variables it works.\r\n\r\n```\r\n\r\nIn [14]: diophantine(6*n + 9*m + 20*k - x)\r\nOut[14]: set([(24⋅n - 9⋅t - 4⋅x, -54⋅n + 20⋅t + 9⋅x, n, x)])\r\n\r\n```\r\n\r\nAll variables are set as `integer=True`. "},"comment":{"url":"https://api.github.com/repos/sympy/sympy/issues/comments/121854405","html_url":"https://github.com/sympy/sympy/issues/9539#issuecomment-121854405","issue_url":"https://api.github.com/repos/sympy/sympy/issues/9539","id":121854405,"user":{"login":"jksuom","id":6929119,"avatar_url":"https://avatars.githubusercontent.com/u/6929119?v=3","gravatar_id":"","url":"https://api.github.com/users/jksuom","html_url":"https://github.com/jksuom","followers_url":"https://api.github.com/users/jksuom/followers","following_url":"https://api.github.com/users/jksuom/following{/other_user}","gists_url":"https://api.github.com/users/jksuom/gists{/gist_id}","starred_url":"https://api.github.com/users/jksuom/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/jksuom/subscriptions","organizations_url":"https://api.github.com/users/jksuom/orgs","repos_url":"https://api.github.com/users/jksuom/repos","events_url":"https://api.github.com/users/jksuom/events{/privacy}","received_events_url":"https://api.github.com/users/jksuom/received_events","type":"User","site_admin":false},"created_at":"2015-07-16T07:09:45Z","updated_at":"2015-07-16T07:09:45Z","body":"I believe that a complete solution is expected. In many cases some of the variables can also act as parameters. That is what happens with the current code."}}