Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[Bug]: Setup.py #146

Closed
1 task done
cmk-Destro opened this issue Apr 16, 2023 · 11 comments
Closed
1 task done

[Bug]: Setup.py #146

cmk-Destro opened this issue Apr 16, 2023 · 11 comments
Assignees
Labels
bug Something isn't working

Comments

@cmk-Destro
Copy link

What happened?

Trying to Run Setup.py
Tried the dev build and that gave me same output!

Im using a Cloud machine with Canonical-Ubuntu-20.04-aarch64

Operating Sys

Linux

Branch

  • Tried dev-builds

Relevant log output

Kirysaki@CloudMachine ~/bad_copenheimer-dev-builds$ python3 setup.py
[JSE] /home/ubuntu/.local/lib/python3.8/site-packages/javascript/js/bridge.js:14
[JSE] const debug = process.env.DEBUG?.includes('jspybridge') ? console.debug : () => { }
[JSE]                                 ^
[JSE] SyntaxError: Unexpected token .
[JSE]     at Module._compile (internal/modules/cjs/loader.js:723:23)
[JSE]     at Object.Module._extensions..js (internal/modules/cjs/loader.js:789:10)
[JSE]     at Module.load (internal/modules/cjs/loader.js:653:32)
[JSE]     at tryModuleLoad (internal/modules/cjs/loader.js:593:12)
[JSE]     at Function.Module._load (internal/modules/cjs/loader.js:585:3)
[JSE]     at Function.Module.runMain (internal/modules/cjs/loader.js:831:12)
[JSE]     at startup (internal/bootstrap/node.js:283:19)
[JSE]     at bootstrapNodeJSCore (internal/bootstrap/node.js:623:3)

** The Node process has crashed. Please restart the runtime to use JS APIs. **

Timed out get 0 needsNodePatches None
Traceback (most recent call last):
  File "setup.py", line 4, in <module>
    from utils import logger
  File "/home/ubuntu/bad_copenheimer-dev-builds/utils/__init__.py", line 10, in <module>
    from .server import Server
  File "/home/ubuntu/bad_copenheimer-dev-builds/utils/server.py", line 4, in <module>
    from javascript import On, require
  File "/home/ubuntu/.local/lib/python3.8/site-packages/javascript/__init__.py", line 20, in <module>
    init()
  File "/home/ubuntu/.local/lib/python3.8/site-packages/javascript/__init__.py", line 16, in init
    if config.global_jsi.needsNodePatches():
  File "/home/ubuntu/.local/lib/python3.8/site-packages/javascript/proxy.py", line 225, in __getattr__
    methodType, val = self._exe.getProp(self._pffid, attr)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/javascript/proxy.py", line 145, in getProp
    resp = self.ipc("get", ffid, method)
  File "/home/ubuntu/.local/lib/python3.8/site-packages/javascript/proxy.py", line 38, in ipc
    raise Exception(f"Timed out accessing '{attr}'")
Exception: Timed out accessing 'needsNodePatches'
@cmk-Destro cmk-Destro added the bug Something isn't working label Apr 16, 2023
@Pilot1782
Copy link
Owner

Install node.js>=16

@cmk-Destro
Copy link
Author

I was indeed using version 10.18 but now i get this error

Kirysaki@CloudMachine ~/bad_copenheimer-dev-builds$ python3 mongoBot.pyw
mongoBot.pyw:13: DeprecationWarning: The v4 is now deprecated and won't be supported in the future. Please, migrate to v5. https://github.com/interactions-py/interactions.py
  import interactions
Traceback (most recent call last):
  File "mongoBot.pyw", line 25, in <module>
    import utils
  File "/home/ubuntu/bad_copenheimer-dev-builds/utils/__init__.py", line 6, in <module>
    from .database import Database
  File "/home/ubuntu/bad_copenheimer-dev-builds/utils/database.py", line 4, in <module>
    class Database:
  File "/home/ubuntu/bad_copenheimer-dev-builds/utils/database.py", line 9, in Database
    ) -> list[dict[str, int]]:
TypeError: 'type' object is not subscriptable

@cmk-Destro
Copy link
Author

only python above 3.9 can run that

@Pilot1782
Copy link
Owner

I'm not able to reproduce this but for a temporary fix in "/home/ubuntu/bad_copenheimer-dev-builds/utils/database.py", line 9, you can remove the return type and see if that resolves it.

@cmk-Destro
Copy link
Author

No more errors related to that just weird ones like :

Kirysaki@CloudMachine ~/bad_copenheimer-dev-builds$ python3 setup.py
Traceback (most recent call last):
  File "/home/ubuntu/bad_copenheimer-dev-builds/setup.py", line 4, in <module>
    from utils import logger
  File "/home/ubuntu/bad_copenheimer-dev-builds/utils/__init__.py", line 7, in <module>
    from .finder import Finder
  File "/home/ubuntu/bad_copenheimer-dev-builds/utils/finder.py", line 8, in <module>
    import interactions
ModuleNotFoundError: No module named 'interactions'
Kirysaki@CloudMachine ~/bad_copenheimer-dev-builds$ pip install -r requirements.txt
Defaulting to user installation because normal site-packages is not writeable
Collecting mcstatus (from -r requirements.txt (line 1))
  Using cached mcstatus-10.0.2-py3-none-any.whl (26 kB)
Collecting discord-py-interactions (from -r requirements.txt (line 2))
  Using cached discord_py_interactions-5.0.1-py3-none-any.whl (838 kB)
Requirement already satisfied: pymongo in /usr/local/lib/python3.11/dist-packages (from -r requirements.txt (line 3)) (4.3.3)
Requirement already satisfied: requests in /usr/lib/python3/dist-packages (from -r requirements.txt (line 4)) (2.22.0)
Collecting python-masscan (from -r requirements.txt (line 5))
  Using cached python-masscan-1.0.0.tar.gz (7.7 kB)
  Preparing metadata (setup.py) ... error
  error: subprocess-exited-with-error

  × python setup.py egg_info did not run successfully.
  │ exit code: 1
  ╰─> [1 lines of output]
      ERROR: Can not execute `setup.py` since setuptools is not available in the build environment.
      [end of output]

  note: This error originates from a subprocess, and is likely not a problem with pip.
error: metadata-generation-failed

× Encountered error while generating package metadata.
╰─> See above for output.

note: This is an issue with the package mentioned above, not pip.
hint: See above for details.

Im using python 3.11.3

@cmk-Destro
Copy link
Author

Btw setuptools is already installed

Kirysaki@CloudMachine ~/bad_copenheimer-dev-builds$ pip install setuptools                                                                                                              
Defaulting to user installation because normal site-packages is not writeable
Requirement already satisfied: setuptools in /usr/lib/python3/dist-packages (45.2.
```0)

@Pilot1782
Copy link
Owner

Pilot1782 commented Apr 16, 2023

Is masscan installed? And interactions is discord-py-interactions

@cmk-Destro
Copy link
Author

yes it is

@Pilot1782
Copy link
Owner

Pilot1782 commented Apr 16, 2023

Check the docs to pass an overridden path for where masscan is installed, as I don't think they have implemented the paths for arch I think you should make an issue with the package owner, the package is called 'python-masscan'

@cmk-Destro
Copy link
Author

cmk-Destro commented Apr 16, 2023

but i was using masscan until the installation of the bot with no problems at all, i can reset the cloud machine to try again

@cmk-Destro
Copy link
Author

cmk-Destro commented Apr 16, 2023

what version of python you have installed?
i keep getting weird errors
my dc is Kirysaki#0809 if you need any info about system etc

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants