Cant load folder to import (Pycharm) - import

Hi guys I have a problem. I cant import my module "browser.py" because i cant load my third directory (here: "enums1").
Everytime I enter the dot after the directory "whatsapp", only par, not and main are shown as the only options.
Load Directory

Related

Failed to import package with error: Couldn't decompress package

I've been trying to import the asset called Winter Forest Envoriment and everytime I click import it gives me the error "Failed to import package with error: Couldn't decompress package
UnityEngine.GUIUtility:,ProcessEvent(Int32, IntPtr, Boolean&)"
I've stumpled across some other threads were they imported outside the unity package manager, and not directly from the package manager. Other assets works like a charm except this one, and since there aren't a remove button in the package manager anymore I can't delete and try again.
Any help is appreciated :)
Try deleting and re-downloading. You'll likely find it under:
%AppData%\Roaming\Unity\Asset Store-5.x
I've encountered this issue before when I didn't have enough disk space on my computer for Unity to decompress the package. So, if you haven't done so yet, check that you have enough storage.
make sure you have the required space and the project folder location in a writable directory
use winrar to open the unitypackage, it will display a file within it, extract that file and import it as custom package, note: when you try to import the extracted file change file type from unity package to all in the import select window
your unity 3d is in play mode that's why it not import first stop your game play.
Check the space on the drive:
%AppData%\Roaming\Unity\Asset Store-5.x
which is under your main user directory on the system drive
NOT necessarily the same drive where Unity is installed.
Once there is enough space and write permission on this drive, go in
and Delete the folder in there containing the Asset you were trying to
install. (eg Yughes Free Ground Materials)
Go back to the package manager and refresh the list of assets, which should make the Download button reappear.
Redownload the package and import successfully.
This step by step is basically a summary of the correct information from the above answers.

How do I use pyinstaller to package a large multi-folder project?

Here is an example project folder structure similar to my actual project.
-repo_folder
--app_folder
---GUI_folder
----GUI1.py
----GUI2.py
---calculations_folder
----calculations1.py
----calculations2.py
---main.py
--cli.py
cli.py points to main.py. Main.py only import GUI1.py. And from there GUI2.py is imported and so on.
Basically, is there an easy way to make sure that all the importing done in each file is included? I have not been able to succesfully export a project with this kind of folder setup succesfully using pyinstaller. I keep getting "Failed to execute script cli" or "No module named GUI".
Could someone make an example of how the code would be import for a project structured like the above?

Neo4j Import Tool for Dummies

I am new to neo4j and have "0" coding background (although trying to learn some). I understand the basic functionalities and am also able to import nodes and relationships using LOAD CSV. However, I absolutely can not make the neo4j-admin import tool work.
I created a new database, included the simplest CSV file in the import folder and tried the following (I will have to explain in the most simple terms - so don't laugh :))
Name of the file is test.csv
Content;
PropertyTest,:LABEL
proptest,TEST
I tried running the neo4j-import file by trying to open it. A black screen opens up and immediately disappears.
I tried ---> bin/neo4j-admin import --id-type=STRING \
--nodes:TEST=test.csv \
--nodes="test.csv" \
Could someone please explain to me with the simplest terms what the steps would be to import this?
Thank you.
The import folder under your Neo4j installation is fine to use but just bear in mind that the dbms.directories.import setting in neo4j.conf is just for the LOAD CSV command, not for neo4j-admin import.
Since your current directory in the command prompt is the bin folder, when you run the import command specifying import/movies.csv then that implies that the CSV file is in a folder called import under the current directory, under the bin folder.
If you run the command this way it should find the CSV files:
neo4j-admin import --nodes=../import/movies.csv --nodes=../import/actors.csv --relationships=../import/roles.csv
.. means the parent directory so running the command this way means to go up to the parent directory and then into the import directory under the parent dir.

How can I import custom modules from a Github repository in Google Colab?

I understand how to run a single notebook in Colab. However, I am not sure how to use all files from a repository, i.e to be able to import functions inside Colab notebook?
Thank you.
Let's say we want to run the ipynb file, named as "1-fully-connected-binarized-mnist" residing in the repo "qnn-inference-examples".
https://github.com/maltanar/qnn-inference-examples
The notebook of interest uses customly created QNN library and functions inside that repo. Yes we need to import that function. To do this, we should first upload the repo folder to Google Colab, then correct/modify library and file paths.
0) Open the ipynb file "1-fully-connected-binarized-mnist" on your Colab. You can rename it if you like.
Try to run it, but will probably get some errors (as I did). So let's fix these issues
1) Insert a new code cell at the top of the notebook. And clone the repo on your Colab:
!git clone https://github.com/maltanar/qnn-inference-examples.git
now the new folder "qnn-inference-examples" created under your "content" folder. you should see something like this on the left side. And remember the path "/content/qnn-inference-examples"
2) Now add the second new cell on top:
import sys
sys.path.insert(0,'/content/qnn-inference-examples')
This will fix the issue about not able to find the library location, when trying import the QNN libraries.
3) Manually fix the file links on the existing code, according to the new path. Because the library and files now exist under the folder "/content/qnn-inference-examples":
for example replace:
img = Image.open("7.png")
with
img = Image.open("/content/qnn-inference-examples/7.png")
These steps should do the work
Please note that: This is not my own solution, mix of 2 or 3 solutions. Credit goes to Hüseyin Elçi, KDnuggets and Alexandr Haymin
https://medium.com/analytics-vidhya/importing-your-own-python-module-or-python-file-into-colab-3e365f0a35ec
https://www.kdnuggets.com/2018/02/google-colab-free-gpu-tutorial-tensorflow-keras-pytorch.html/2
Please see the example below:
!git clone https://www.github.com/matterport/Mask_RCNN.git
from google.colab import files
files.os.chdir('Mask_RCNN')
# To find local version of the library
sys.path.append(os.path.join(ROOT_DIR, 'Mask_RCNN'))
# here is your import
from mrcnn.config import Config

Eclipse jython import modules/class/.jar

I have been trying to use eclipse as a jython ide. Currently I have been working with a program that has a script editor inside the program(uses jython), but the script must be run in its entirety each time, it is not 'interactive'. There is a large api associated with it and I want to use eclipse to have an interactive console. I cannot import the modules/jar/classes.
I have tried to append the folder containing the jar files to the sys path seen here, I have exploded the jar files and added those files (which have the class files in them) to the sys path seen here. I have added the jar files and class files to the classpath and the user libraries under eclipse>windows>preferences>java>Build Path
Currently I can import without error, I can seemingly construct a class without error, but nothing happens.
An example of what my console looks like is
from myFile import myClass
>>>myObj = myClass.open(fileName)
>>>myObj
>>>type(myObj)
>>>myObj.__class__
>>>type('string')
<type 'str'>
>>>'string'.__class__
<type 'str'>
when I try to create an instance of my class it doesn't throw an error, but it doesn't do anything either. Yet other objects appear to work.
Any insight is appreciated
I use at my project at the moment the jython-standalone.jar on a Windows 7 machine and also using a Java Modul.
I used 7 Zip Manager(because unzipping and adding my jar via the normal zip causes errors) to get acces to the standalone.jar(but it should also work with the normal jython.jar) and add my module via drag&drop into the folder "Lib".
If you're using another OS system try something similar.
Since then I haven't got any problems with importing my java modules so far.