GramAddict / bot

Completely free and open-source human-like Instagram bot. Powered by UIAutomator2 and compatible with basically any Android device 5.0+ that can run Instagram - real or emulated.
https://docs.gramaddict.org
MIT License
1.13k stars 179 forks source link

[Raspberry] raise InvalidVersion(f"Invalid version: '{version}'")packaging.version.InvalidVersion: #348

Closed libere812 closed 9 months ago

libere812 commented 11 months ago

Hi everybody, i installed gramaddict on my raspberry 3B+ But when i run i receive an error

`[11/12 15:48:11] INFO | Do you want to update/create your config-examples folder in local? Do the following: pip3 install --user gitdir (only the first time) python3 -m gitdir https://github.com/GramAddict/bot/tree/master/config-examples (python on Windows) [11/12 15:48:14] INFO | Checking for updates... [11/12 15:48:14] INFO | Bot is updated. [11/12 15:48:14] INFO | GramAddict v.3.2.7 [11/12 15:48:14] INFO | Loading plugins . . . [11/12 15:48:14] INFO | - ActionUnfollowFollowers: Handles the functionality of unfollowing your followers [11/12 15:48:14] INFO | - ClonedApp: Adds support for cloned apps [11/12 15:48:14] INFO | - CoreArguments: Simply adds core arguments [11/12 15:48:14] INFO | - DataAnalytics: Generates a PDF analytics report of current username session data [11/12 15:48:14] INFO | - InteractBloggerPostLikers: Handles the functionality of interacting with a blogger [11/12 15:48:14] INFO | - InteractBloggerFollowers_Following: Handles the functionality of interacting with a bloggers followers/following [11/12 15:48:14] INFO | - InteractBloggerPostLikers: Handles the functionality of interacting with a blogger post likers [11/12 15:48:14] INFO | - InteractOwnFeed: Handles the functionality of interacting with your own feed [11/12 15:48:14] INFO | - InteractHashtagLikers: Handles the functionality of interacting with a hashtags likers [11/12 15:48:14] INFO | - InteractHashtagPosts: Handles the functionality of interacting with a hashtags post owners [11/12 15:48:14] INFO | - InteractPlaceLikers: Handles the functionality of interacting with a places likers [11/12 15:48:14] INFO | - InteractPlacePosts: Handles the functionality of interacting with a places post owners [11/12 15:48:14] INFO | - LikeFromURLs: Likes a post from url. The urls are read from a plaintext file [11/12 15:48:14] INFO | - RemoveFollowersFromList: Remove account followers from a list of usernames [11/12 15:48:14] WARNING | If you want to use telegram_reports, please type in console: 'pip3 install gramaddict[telegram-reports]' [11/12 15:48:14] INFO | - TelegramReports: Generate reports at the end of the session and send them using telegram [11/12 15:48:15] INFO | Time delta has set to 00:22:33. [D 231112 15:48:15 init:661] [pid:1635] [521007a7eaf3248f] kill process(ps): uiautomator Traceback (most recent call last): File "/home/parrotbot/.local/lib/python3.9/site-packages/uiautomator2/init.py", line 486, in _jsonrpc_retry_call return self._jsonrpc_call(*args, **kwargs) File "/home/parrotbot/.local/lib/python3.9/site-packages/uiautomator2/init.py", line 556, in _jsonrpc_call raise err uiautomator2.exceptions.UiAutomationNotConnectedError: ({'code': -32001, 'message': 'java.lang.IllegalStateException', 'data': 'java.lang.IllegalStateException: UiAutomation not connected!\n\tat android.app.UiAutomation.throwIfNotConnectedLocked(UiAutomation.java:1043)\n\tat android.app.UiAutomation.waitForIdle(UiAutomation.java:647)\n\tat androidx.test.uiautomator.QueryController.waitForIdle(QueryController.java:532)\n\tat androidx.test.uiautomator.QueryController.waitForIdle(QueryController.java:523)\n\tat androidx.test.uiautomator.QueryController.getCurrentPackageName(QueryController.java:511)\n\tat androidx.test.uiautomator.UiDevice.getCurrentPackageName(UiDevice.java:653)\n\tat com.github.uiautomator.stub.DeviceInfo.(DeviceInfo.java:51)\n\tat com.github.uiautomator.stub.DeviceInfo.getDeviceInfo(DeviceInfo.java:44)\n\tat com.github.uiautomator.stub.AutomatorServiceImpl.deviceInfo(AutomatorServiceImpl.java:161)\n\tat java.lang.reflect.Method.invoke(Native Method)\n\tat com.googlecode.jsonrpc4j.JsonRpcBasicServer.invoke(JsonRpcBasicServer.java:467)\n\tat com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleObject(JsonRpcBasicServer.java:352)\n\tat com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleJsonNodeRequest(JsonRpcBasicServer.java:283)\n\tat com.googlecode.jsonrpc4j.JsonRpcBasicServer.handleRequest(JsonRpcBasicServer.java:251)\n\tat com.github.uiautomator.stub.AutomatorHttpServer.serve(AutomatorHttpServer.java:100)\n\tat fi.iki.elonen.NanoHTTPD.serve(NanoHTTPD.java:2244)\n\tat fi.iki.elonen.NanoHTTPD$HTTPSession.execute(NanoHTTPD.java:945)\n\tat fi.iki.elonen.NanoHTTPD$ClientHandler.run(NanoHTTPD.java:192)\n\tat java.lang.Thread.run(Thread.java:764)\n'}, 'deviceInfo')

During handling of the above exception, another exception occurred:

Traceback (most recent call last): File "/home/parrotbot/gramaddict/run.py", line 3, in GramAddict.run() File "/home/parrotbot/gramaddict/GramAddict/init.py", line 9, in run start_bot(**kwargs) File "/home/parrotbot/gramaddict/GramAddict/core/bot_flow.py", line 122, in start_bot get_device_info(device) File "/home/parrotbot/gramaddict/GramAddict/core/device_facade.py", line 30, in get_device_info f"Phone Name: {device.get_info()['productName']}, SDK Version: {device.get_info()['sdkInt']}" File "/home/parrotbot/gramaddict/GramAddict/core/device_facade.py", line 314, in get_info return self.deviceV2.info File "/home/parrotbot/.local/lib/python3.9/site-packages/uiautomator2/init.py", line 448, in info return self.jsonrpc.deviceInfo(http_timeout=10) File "/home/parrotbot/.local/lib/python3.9/site-packages/uiautomator2/init.py", line 479, in call return self.server._jsonrpc_retry_call(self.method, params, File "/home/parrotbot/.local/lib/python3.9/site-packages/uiautomator2/init.py", line 488, in _jsonrpc_retry_call self.reset_uiautomator(str(e)) # uiautomator可能出问题了,强制重启一下 File "/home/parrotbot/.local/lib/python3.9/site-packages/uiautomator2/init.py", line 640, in reset_uiautomator ok = self._force_reset_uiautomator_v2( File "/home/parrotbot/.local/lib/python3.9/site-packages/uiautomator2/init.py", line 667, in _force_reset_uiautomator_v2 if self._is_apk_required(): File "/home/parrotbot/.local/lib/python3.9/site-packages/uiautomator2/init.py", line 711, in _is_apk_required if self._package_version("com.github.uiautomator.test") is None: File "/home/parrotbot/.local/lib/python3.9/site-packages/uiautomator2/init.py", line 735, in _package_version return packaging.version.parse(m.group('name') if m else "") File "/home/parrotbot/.local/lib/python3.9/site-packages/packaging/version.py", line 54, in parse return Version(version) File "/home/parrotbot/.local/lib/python3.9/site-packages/packaging/version.py", line 200, in init raise InvalidVersion(f"Invalid version: '{version}'") packaging.version.InvalidVersion: Invalid version: ''`

Thank you

libere812 commented 11 months ago

Solved installing gramaddict with pip

mastrolube commented 9 months ago

it's related to packaging module, use the bot in a protected environment