Pyinstaller does not work with local files - pyqt5

I've made an app with PyQt5 and it works perfectly fine on my environment, and now I wan't to deploy it to .exe and .dmg with pyinstaller.
My app uses two local files certificate.yml and data.pkl which each contains certificate data for AWS and data. These are located in the same directory with main.py, which starts my app.
In my main.spec file I've added following
a.datas += [('certificate.yml', 'certificate.yml', 'DATA'),
('data.pkl', 'data.pkl', 'DATA')]
and made .app. However, when I start my .app, it does not find certificate.yml file and raise following error.
FileNotFoundError: [Errno 2] No such file or directory: 'certificate.yml'
How can I include my local files with pyinstaller?

Related

Can't upload zip file via SSH on mac

I am using Termius to upload files via SSH.
My file location on MAC pc is:
/Applications/MAMP/htdocs/freelancer/youtube-profile-scrapper/mine.zip
Now, I want to upload that file in public_html/youtube-scrap folder.
To do that I am running the following command:
scp
'/Applications/MAMP/htdocs/freelancer/youtube-profile-scrapper/mine.zip'
my_username#my_host_ip_address:/public_html/youtube-scrap
but getting error messge:
Could not create directory
'/home/539799.cloudwaysapps.com/jezczhzuvr/.ssh'.
This is live folder where I want to upload the zip file:
https://phpstack-539799-2547821.cloudwaysapps.com/youtube-scrap/

'gunzip' is not recognized as an internal or external command, operable program or batch file. System command 'gunzip' failed

I am trying to analyse my raw GNSS data on the GNSS Analyser app from here https://github.com/google/gps-measurement-tools. The installation guide includes the following step:
4.2 gunzip installation
The automatic ftp code inside GnssAnalysis will download ephemeris zip files, and attempt to
unzip them using gunzip.
Download gzip.exe from here http://ftp.gnu.org/gnu/gzip/gzip-1.9.zip
Extract the files from the zip file, rename gzip.exe to gunzip.exe
Move gunzip.exe to somewhere in your Windows path (type path in the Windows
Command Prompt to see what your path is, typically you will find a directory
C:\Windows\system32 and you can put gunzip.exe there.)
However, upon downloading gunzip, I cant find a gzip.exe file, and hence tried renaming the gzip.c and gzip.h file instead. It did not work and I got this error when attempting to process my own raw data.
I have just tried and got success to import DB from a backup file:
gzip -d < C:\Users\my-user\Downloads\my-db-backup.sql.gz | mysql -u root -p MY_DB_NAME

Moving Smarty website to new server

I'm moving a website to a new domain and server and I'm running into some problems. This website works with Smarty, and I've never used it before. I think I got a very basic problem, but I can't find the answer online.
I've moved all the FTP files to the new server
I've copied the database
I've edited the config file with the new database information
Now only EVERY page (even a blank test.php file with a simple echo) I get "failed to open stream" errors.
Warning: rename(/home/*websitename*/domains/*websitename*.com/public_html//skins/default/compiled/65e3d4d7349f9687ce73f56b61992749304409a2.file.index.tpl.php) [function.rename]: failed to open stream: Permission denied in /home/*websitename*/domains/*websitename*.com/public_html/external/smarty/sysplugins/smarty_internal_write_file.php on line 48
Warning: rename(/tmp/wrtPBIHNP,/home/*websitename*/domains/*websitename*.com/public_html//skins/default/compiled/65e3d4d7349f9687ce73f56b61992749304409a2.file.index.tpl.php) [function.rename]: Permission denied in /home/*websitename*/domains/*websitename*.com/public_html/external/smarty/sysplugins/smarty_internal_write_file.php on line 48
Warning: chmod() [function.chmod]: No such file or directory in /home/*websitename*/domains/*websitename*.com/public_html/external/smarty/sysplugins/smarty_internal_write_file.php on line 50
Warning: include(/home/*websitename*/domains/*websitename*.com/public_html//skins/default/compiled/65e3d4d7349f9687ce73f56b61992749304409a2.file.index.tpl.php) [function.include]: failed to open stream: No such file or directory in /home/*websitename*/domains/*websitename*.com/public_html/external/smarty/sysplugins/smarty_internal_template.php on line 432
Warning: include() [function.include]: Failed opening '/home/*websitename*/domains/*websitename*.com/public_html//skins/default/compiled/65e3d4d7349f9687ce73f56b61992749304409a2.file.index.tpl.php' for inclusion (include_path='.:/usr/local/lib/php') in /home/*websitename*/domains/*websitename*.com/public_html/external/smarty/sysplugins/smarty_internal_template.php on line 432
It looks like a problem with premissions, but I've made EVERY file on the FTP premission 777 (to test) and this does not solve it.
There are two backslashes /public_html//skins/ which is weird.
The code is exactly the same on the "old" server, besides the config file. Only thing new is the domain name.
What am I doing wrong?
You should set for directory compiled permissions 755 or 777.
You should probably also remove all compiled and cached files (if you use cache) because it may also cause problems

Flask, Apache, CentOS, and Permission Denied on the datastore

I've setup up a flask project on a CentOS 6.4 machine, with python 2.7.6 and mod_wsgi 3.x that I built myself on the box.
The app uses a file based database for storing RDF data, and I'm getting an Error 13 on the folder containing the datastore.
from genometry import app as application
File "/opt/genometry/software/genometry.py", line 125, in <module>
db, classes, user_datastore, security = create_db(app)
File "/opt/genometry/software/genometry.py", line 101, in create_db
db.store.open(app.config['db'])
"build/bdist.linux-x86_64/egg/rdflib/plugins/sleepycat.py", line 89, in open
db_env = self._init_db_environment(homeDir, create)
File "build/bdist.linux-x86_64/egg/rdflib/plugins/sleepycat.py", line 66, in _init_db_environment
mkdir(homeDir)
OSError: [Errno 13] Permission denied: 'store.kb'
I've tried everything I can think of. Changed the /opt and everything under it to be owned by apache:apache. Changed /opt and everything under it to be 777, and yet still a permissions error. How can that be? What's the best way to setup the permission on folder "store.kb"
It turns out the problem was that Apache was looking for the store.kb in /var/www due to the rdfalchemy db uri. I updated it to:
app.config['rdfalchemy_dburi'] = 'sleepycat:////{0}/store.kb'.format(PROJECT_ROOT)
and now everything works fine

reputation module installation in phpbb3

Hi i am trying to install phpbb-reputation system i followed the xml file for installation but while executing install_reputation.php i am getting this error ERROR: Could not open the file ./styles/afterburnerafterburner_config.html for reading.There are many errors in the same fashin. where i gues it is not going inside afterburner/template folder where .html file exists. where should i check this?
More error samples:
Refreshing the proFormell template
ERROR: Could not open the file ./styles/proFormellcaptcha_recaptcha.html for reading.
Sounds like it's a permissions issue; if hosting on a LAMP server, just run chmod 755 * -R in the website root directory. Alternatively you could also change file permissions using an FTP client